diff --git a/src/App/App.js b/src/App/App.js index de443d9d4..d6e92fbbb 100644 --- a/src/App/App.js +++ b/src/App/App.js @@ -146,8 +146,10 @@ const App = () => { .catch((e) => console.error(e)); } return () => { - window.removeEventListener('focus', onWindowFocus); - services.core.transport.off('CoreEvent', onCoreEvent); + if (services.core.active) { + window.removeEventListener('focus', onWindowFocus); + services.core.transport.off('CoreEvent', onCoreEvent); + } }; }, [initialized]); return (