feat(sentry): only load sentry when it's enabled

This commit is contained in:
kolaente 2023-06-18 14:49:25 +02:00
parent 653415e764
commit 96c9407414
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 6 additions and 6 deletions

View File

@ -4,7 +4,6 @@ import {createApp} from 'vue'
import pinia from './pinia' import pinia from './pinia'
import router from './router' import router from './router'
import App from './App.vue' import App from './App.vue'
import {setupSentry} from './sentry'
import {error, success} from './message' import {error, success} from './message'
import {VERSION} from './version.json' import {VERSION} from './version.json'
@ -105,12 +104,13 @@ setLanguage(browserLanguage).then(() => {
} }
if (window.SENTRY_ENABLED) { if (window.SENTRY_ENABLED) {
try{ try {
setupSentry(app, router) import {setupSentry} from './sentry'
} catch(e) { setupSentry(app, router).then(sentry => sentry.default(app, router))
console.error('Could not enable Sentry tracking', e) } catch (e) {
console.error('Could not enable Sentry tracking', e)
}
} }
}
app.use(pinia) app.use(pinia)
app.use(router) app.use(router)