Support not having bugsnag available

This commit is contained in:
Gilbert 2024-05-01 15:03:59 -05:00
parent 46476bef28
commit 535c37d0b4

View File

@ -39,7 +39,9 @@ const gqlEndpoint = `${import.meta.env.VITE_SERVER_URL}/${SERVER_GQL_PATH}`;
const gqlClient = new GQLClient({ gqlEndpoint });
const ErrorBoundary = Bugsnag.getPlugin('react')!.createErrorBoundary(React);
const ErrorBoundary = bugsnagApiKey
? Bugsnag.getPlugin('react')!.createErrorBoundary(React)
: ({ children }: any) => children;
root.render(
<ErrorBoundary>