ensure window exists for universal rendering

This commit is contained in:
Dustan Kasten 2015-08-11 12:54:31 -04:00
parent 02cce1bfb8
commit f3f4d60762

View File

@ -3,7 +3,9 @@ import LogMonitorEntry from './LogMonitorEntry';
export default class LogMonitor {
constructor() {
window.addEventListener('keydown', ::this.handleKeyPress);
if (typeof window !== 'undefined') {
window.addEventListener('keydown', ::this.handleKeyPress);
}
}
static propTypes = {