Skip to content

Commit ab269b1

Browse files
committed
tweak
1 parent a847a59 commit ab269b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/color.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export async function getColorEnabledAsync(): Promise<boolean> {
3838
const { navigator } = globalThis as any
3939

4040
const isNoColor =
41-
'userAgent' in navigator && navigator.userAgent === 'Cloudflare-Workers'
41+
navigator !== undefined && navigator.userAgent === 'Cloudflare-Workers'
4242
? // eslint-disable-next-line @typescript-eslint/ban-ts-comment
4343
// @ts-ignore
4444
'NO_COLOR' in ((await import('cloudflare:workers')).env ?? {}) // ?? {} is for backward compat

0 commit comments

Comments
 (0)