fix: case when sentry auth token is not set

This commit is contained in:
Torsten Dittmann
2024-06-26 12:48:52 +02:00
parent b1ca9027e7
commit 03f2fa920f
2 changed files with 2 additions and 4 deletions

View File

@@ -3,11 +3,10 @@ import type { Handle } from '@sveltejs/kit';
import redirects from './redirects.json';
import { sequence } from '@sveltejs/kit/hooks';
import { BANNER_KEY, SENTRY_DSN } from '$lib/constants';
import { SENTRY_AUTH_TOKEN } from '$env/static/private';
import { building } from '$app/environment';
Sentry.init({
enabled: !!SENTRY_AUTH_TOKEN && building,
enabled: !!import.meta.env?.SENTRY_AUTH_TOKEN && building,
dsn: SENTRY_DSN,
tracesSampleRate: 1
})