Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 33b08f9

Browse files
committedMay 9, 2019
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

Lines changed: 1 addition & 1 deletion
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)
Please sign in to comment.