Merge pull request #50 from iamdustan/make-sure-window-exists-for-server-rendering

ensure window exists for universal rendering
This commit is contained in:
Dan Abramov 2015-08-11 22:25:26 +03:00
commit b1367c61d4

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 = {