We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a847a59 commit ab269b1Copy full SHA for ab269b1
src/utils/color.ts
@@ -38,7 +38,7 @@ export async function getColorEnabledAsync(): Promise<boolean> {
38
const { navigator } = globalThis as any
39
40
const isNoColor =
41
- 'userAgent' in navigator && navigator.userAgent === 'Cloudflare-Workers'
+ navigator !== undefined && navigator.userAgent === 'Cloudflare-Workers'
42
? // eslint-disable-next-line @typescript-eslint/ban-ts-comment
43
// @ts-ignore
44
'NO_COLOR' in ((await import('cloudflare:workers')).env ?? {}) // ?? {} is for backward compat
0 commit comments