diff --git a/src/client/shared/wrap.ts b/src/client/shared/wrap.ts index 1e4d3e8..3581f12 100644 --- a/src/client/shared/wrap.ts +++ b/src/client/shared/wrap.ts @@ -74,11 +74,11 @@ export default function (client: ScramjetClient, self: typeof globalThis) { debugger; } - if (v === self && v.$scramjet) { + if (v === self && v?.$scramjet) { debugger; } - if (iswindow && v instanceof Document && v.defaultView.$scramjet) { + if (iswindow && v instanceof Document && v.defaultView?.$scramjet) { debugger; } diff --git a/src/controller/index.ts b/src/controller/index.ts index d8fc693..e8b9fa7 100644 --- a/src/controller/index.ts +++ b/src/controller/index.ts @@ -32,7 +32,7 @@ export class ScramjetController { naiiveRewriter: false, strictRewrites: true, rewriterLogs: true, - captureErrors: false, + captureErrors: true, cleanErrors: false, scramitize: false, sourcemaps: false,