Fix window reference for node tests

This commit is contained in:
Niklas von Hertzen 2018-02-15 22:19:25 +08:00
parent da2794f7f7
commit 01e4920876

View File

@ -7,7 +7,7 @@ export default class Logger {
id: ?string;
constructor(enabled: boolean, id: ?string, start: ?number) {
this.enabled = enabled;
this.enabled = typeof window !== 'undefined' && enabled;
this.start = start ? start : Date.now();
this.id = id;
}