attempt to fix error

This commit is contained in:
Daniel Bulant 2022-12-12 20:47:08 +01:00
parent 96bb83b304
commit 888480623c

View file

@ -6,7 +6,7 @@ import { BrowserTracing } from "@sentry/tracing";
export function load({ url, event }) {
let sentry;
// @ts-ignore
if(import.meta.env.VITE_SENTRY_DSN) if(typeof window === 'undefined') {
if(import.meta.env.VITE_SENTRY_DSN && typeof event !== "undefined") if(typeof window === 'undefined') {
sentry = new Toucan({
// @ts-ignore
dsn: import.meta.env.VITE_SENTRY_DSN,
@ -27,6 +27,7 @@ export function load({ url, event }) {
'content-type',
'x-real-ip',
'host',
'cf-ipcountry'
],
allowedSearchParams: /(.*)/
}