Skip to content

Commit 33b08f9

Browse files
committed
Fix browser detection
Web Workers are browser too.
1 parent 6064f27 commit 33b08f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/util/src/environment.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export function isNode(): boolean {
6868
* Detect Browser Environment
6969
*/
7070
export function isBrowser(): boolean {
71-
return typeof window !== 'undefined';
71+
return typeof self !== 'undefined';
7272
}
7373

7474
/**

0 commit comments

Comments
 (0)