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 router from './router'
import App from './App.vue'
import {setupSentry} from './sentry'
import {error, success} from './message'
import {VERSION} from './version.json'
@ -106,7 +105,8 @@ setLanguage(browserLanguage).then(() => {
if (window.SENTRY_ENABLED) {
try {
setupSentry(app, router)
import {setupSentry} from './sentry'
setupSentry(app, router).then(sentry => sentry.default(app, router))
} catch (e) {
console.error('Could not enable Sentry tracking', e)
}