diff --git a/src/client/client.ts b/src/client/client.ts index 77f52a6..4e7f327 100644 --- a/src/client/client.ts +++ b/src/client/client.ts @@ -310,7 +310,7 @@ export class ScramjetClient { } } - delete Error.prepareStackTrace; + Error.prepareStackTrace = pst; if (earlyreturn) { return returnValue; diff --git a/src/client/shared/sourcemaps.ts b/src/client/shared/sourcemaps.ts index 135c097..b0bfded 100644 --- a/src/client/shared/sourcemaps.ts +++ b/src/client/shared/sourcemaps.ts @@ -5,7 +5,7 @@ let sourcemaps: { map: [string, number, number][]; }[] = []; -export const enabled = self.$scramjet.config.flags.sourcemaps; +export const enabled = () => self.$scramjet.config.flags.sourcemaps; export default function (client: ScramjetClient, self: Self) { // every script will push a sourcemap