diff --git a/src/react/LogMonitor.js b/src/react/LogMonitor.js index 99691c9b..d710dcc4 100644 --- a/src/react/LogMonitor.js +++ b/src/react/LogMonitor.js @@ -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 = {