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 }) { export function load({ url, event }) {
let sentry; let sentry;
// @ts-ignore // @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({ sentry = new Toucan({
// @ts-ignore // @ts-ignore
dsn: import.meta.env.VITE_SENTRY_DSN, dsn: import.meta.env.VITE_SENTRY_DSN,
@ -27,6 +27,7 @@ export function load({ url, event }) {
'content-type', 'content-type',
'x-real-ip', 'x-real-ip',
'host', 'host',
'cf-ipcountry'
], ],
allowedSearchParams: /(.*)/ allowedSearchParams: /(.*)/
} }