Skip to content

Commit 01e4920

Browse files
committed
Fix window reference for node tests
1 parent da2794f commit 01e4920

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Logger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default class Logger {
77
id: ?string;
88

99
constructor(enabled: boolean, id: ?string, start: ?number) {
10-
this.enabled = enabled;
10+
this.enabled = typeof window !== 'undefined' && enabled;
1111
this.start = start ? start : Date.now();
1212
this.id = id;
1313
}

0 commit comments

Comments
 (0)