From 28946bc782864d3b5bc8712619dfda2e49f771e3 Mon Sep 17 00:00:00 2001 From: Satbir Singh Date: Mon, 16 Mar 2020 09:04:21 +0000 Subject: [PATCH] Moving error boundary to allow for sentry errors. --- app/client/src/widgets/BaseWidget.tsx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/client/src/widgets/BaseWidget.tsx b/app/client/src/widgets/BaseWidget.tsx index 196f432bc7..dd66ef1ebb 100644 --- a/app/client/src/widgets/BaseWidget.tsx +++ b/app/client/src/widgets/BaseWidget.tsx @@ -169,7 +169,14 @@ abstract class BaseWidget< } render() { - return this.getWidgetView(); + let isValid = true; + if (this.props.invalidProps) { + isValid = _.keys(this.props.invalidProps).length === 0; + } + if (this.props.isLoading) isValid = true; + return ( + {this.getWidgetView()} + ); } private getWidgetView(): JSX.Element { @@ -205,7 +212,7 @@ abstract class BaseWidget< this.props.widgetId === "0" } > - {this.getPageView()} + {this.getPageView()} ); } @@ -218,14 +225,7 @@ abstract class BaseWidget< abstract getPageView(): JSX.Element; getCanvasView(): JSX.Element { - let isValid = true; - if (this.props.invalidProps) { - isValid = _.keys(this.props.invalidProps).length === 0; - } - if (this.props.isLoading) isValid = true; - return ( - {this.getPageView()} - ); + return this.getPageView(); } // TODO(Nikhil): Revisit the inclusion of another library for shallowEqual.