Skip to content

Commit f8d5dc7

Browse files
NathanWalkermhevery
authored andcommitted
fix: window undefined in node environments
Closes angular#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

+1-1
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)