fix: prevent crash in Firefox dev

This commit is contained in:
EnixCoda 2020-02-08 00:36:32 +08:00
parent 47e00af6b4
commit c3baf8b1af
No known key found for this signature in database
GPG key ID: 0C1A07377913A1DD

View file

@ -21,6 +21,7 @@ const sentryOptions: Sentry.BrowserOptions = {
environment: IN_PRODUCTION_MODE ? 'production' : 'development',
// Not safe to activate all integrations in non-Chrome environments where Gitako may not run in top context
// https://docs.sentry.io/platforms/javascript/#sdk-integrations
defaultIntegrations: IN_PRODUCTION_MODE ? undefined : false,
integrations: integrations => integrations.filter(({ name }) => name !== 'TryCatch'),
beforeSend(event) {
const message = event.exception?.values?.[0].value || event.message