Skip to content

Commit

Permalink
Revert "do not use ErrorBoundary in development mode"
Browse files Browse the repository at this point in the history
This reverts commit e9ae244.
  • Loading branch information
incognitojam committed Jul 26, 2023
1 parent e9ae244 commit 05bf34e
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,25 +119,14 @@ class App extends Component {

const showLogin = !MyCommaAuth.isAuthenticated() && !isDemo() && !getZoom(window.location.pathname)
&& !getClipsNav(window.location.pathname)?.clip_id;
let content = (
<Suspense fallback={this.renderLoading()}>
{ showLogin ? this.anonymousRoutes() : this.authRoutes() }
</Suspense>
);

// Use ErrorBoundary in production only
if (import.meta.env.PROD) {
content = (
<Sentry.ErrorBoundary fallback={props => <ErrorFallback {...props} />}>
{content}
</Sentry.ErrorBoundary>
);
}

return (
<Provider store={store}>
<ConnectedRouter history={history}>
{content}
<Sentry.ErrorBoundary fallback={props => <ErrorFallback {...props} />}>
<Suspense fallback={this.renderLoading()}>
{ showLogin ? this.anonymousRoutes() : this.authRoutes() }
</Suspense>
</Sentry.ErrorBoundary>
</ConnectedRouter>
</Provider>
);
Expand Down

0 comments on commit 05bf34e

Please sign in to comment.