diff options
Diffstat (limited to 'ext/node/polyfills/console.ts')
-rw-r--r-- | ext/node/polyfills/console.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/node/polyfills/console.ts b/ext/node/polyfills/console.ts index bfc9be051..f811f1a86 100644 --- a/ext/node/polyfills/console.ts +++ b/ext/node/polyfills/console.ts @@ -1,6 +1,10 @@ // Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. import { Console } from "internal:deno_node/polyfills/internal/console/constructor.mjs"; +import { windowOrWorkerGlobalScope } from "internal:runtime/js/98_global_scope.js"; +// Don't rely on global `console` because during bootstrapping, it is pointing +// to native `console` object provided by V8. +const console = windowOrWorkerGlobalScope.console.value; export default Object.assign({}, console, { Console }); |