diff options
author | Luca Casonato <hello@lcas.dev> | 2024-08-28 21:13:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-28 21:13:34 +0200 |
commit | 64037b1f027ac977a0f227669d367cf2e1c71791 (patch) | |
tree | b990ff19c14a9cca3a0779ea47c818407cd3587b /ext/node/polyfills/console.ts | |
parent | b708a13eb02510925b5fd964fe933b4896093185 (diff) |
refactor: don't virtualize the `console` global for node mode (#25263)
Turns out we only virtualized it so one could have a `Console` property,
and the other one not. We can just make this `console.Console` available
everywhere.
Diffstat (limited to 'ext/node/polyfills/console.ts')
-rw-r--r-- | ext/node/polyfills/console.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/node/polyfills/console.ts b/ext/node/polyfills/console.ts index c72cfb160..b1364481f 100644 --- a/ext/node/polyfills/console.ts +++ b/ext/node/polyfills/console.ts @@ -9,7 +9,9 @@ import { windowOrWorkerGlobalScope } from "ext:runtime/98_global_scope_shared.js // to native `console` object provided by V8. const console = windowOrWorkerGlobalScope.console.value; -export default Object.assign({}, console, { Console }); +Object.assign(console, { Console }); + +export default console; export { Console }; export const { |