Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit f8d5dc7

Browse files
NathanWalkermhevery
authored andcommitted
fix: window undefined in node environments
Closes #305
1 parent a6967ad commit f8d5dc7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/browser/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const isNode: boolean =
4040
(typeof process !== 'undefined' && {}.toString.call(process) === '[object process]');
4141

4242
export const isBrowser: boolean =
43-
!isNode && !isWebWorker && !!(window && window['HTMLElement']);
43+
!isNode && !isWebWorker && !!(typeof window !== 'undefined' && window['HTMLElement']);
4444

4545

4646
export function patchProperty(obj, prop) {

0 commit comments

Comments
 (0)