summaryrefslogtreecommitdiff
path: root/ext/console/02_console.js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-01-17 23:23:49 +0100
committerGitHub <noreply@github.com>2022-01-17 23:23:49 +0100
commitbc666e42a89f2f6ab104e5f1c1298ec590a99ce9 (patch)
tree3c2873e350e73b229182fffe1102d7779cac22ac /ext/console/02_console.js
parent1ab5dea367800defa264b633705f8b535bb167d9 (diff)
fix(ext/console): don't depend on globalThis present (#13387)
Diffstat (limited to 'ext/console/02_console.js')
-rw-r--r--ext/console/02_console.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/console/02_console.js b/ext/console/02_console.js
index 435c95187..0ebf5a4d9 100644
--- a/ext/console/02_console.js
+++ b/ext/console/02_console.js
@@ -1650,7 +1650,7 @@
}
function inspectArgs(args, inspectOptions = {}) {
- const noColor = globalThis.Deno?.noColor ?? true;
+ const noColor = colors.getNoColor();
const rInspectOptions = { ...DEFAULT_INSPECT_OPTIONS, ...inspectOptions };
const first = args[0];
let a = 0;
@@ -1759,7 +1759,7 @@
function getConsoleInspectOptions() {
return {
...DEFAULT_INSPECT_OPTIONS,
- colors: !(globalThis.Deno?.noColor ?? false),
+ colors: !colors.getNoColor(),
};
}