From c94d4849c192ff0889d974afcb5c7c10250c63b6 Mon Sep 17 00:00:00 2001 From: Brandon Farmer Date: Thu, 19 Apr 2018 16:19:20 -0700 Subject: [PATCH] Show proper name for components with error handling --- ui/src/shared/decorators/errors.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/src/shared/decorators/errors.tsx b/ui/src/shared/decorators/errors.tsx index f33550820..5d1d384d1 100644 --- a/ui/src/shared/decorators/errors.tsx +++ b/ui/src/shared/decorators/errors.tsx @@ -7,6 +7,10 @@ export function ErrorHandling< T extends {new (...args: any[]): React.Component} >(constructor: T) { class Wrapped extends constructor { + public static get displayName(): string { + return constructor.name + } + private error: boolean = false public componentDidCatch(error, info) { @@ -29,5 +33,6 @@ export function ErrorHandling< return super.render() } } + return Wrapped }