Merge branch 'fix/widget-sentry' into 'release'

Moving error boundary to allow for sentry errors.

See merge request theappsmith/internal-tools-client!380
This commit is contained in:
Satbir Singh 2020-03-16 09:04:21 +00:00
commit 120b62cb8a

View File

@ -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 (
<ErrorBoundary isValid={isValid}>{this.getWidgetView()}</ErrorBoundary>
);
}
private getWidgetView(): JSX.Element {
@ -205,7 +212,7 @@ abstract class BaseWidget<
this.props.widgetId === "0"
}
>
<ErrorBoundary isValid>{this.getPageView()}</ErrorBoundary>
{this.getPageView()}
</PositionedContainer>
);
}
@ -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 (
<ErrorBoundary isValid={isValid}>{this.getPageView()}</ErrorBoundary>
);
return this.getPageView();
}
// TODO(Nikhil): Revisit the inclusion of another library for shallowEqual.