Skip to content

Commit

Permalink
feat(fmt): enable setColorEnabled in browsers (#3485)
Browse files Browse the repository at this point in the history
  • Loading branch information
halvardssm authored Jul 13, 2023
1 parent 6b1da32 commit 2e647b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fmt/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
const { Deno } = globalThis as any;
const noColor = typeof Deno?.noColor === "boolean"
? Deno.noColor as boolean
: true;
: false;

interface Code {
open: string;
Expand All @@ -76,7 +76,7 @@ let enabled = !noColor;
* @param value
*/
export function setColorEnabled(value: boolean) {
if (noColor) {
if (Deno?.noColor) {
return;
}

Expand Down

0 comments on commit 2e647b0

Please sign in to comment.