fix(App): core error handling was broken

This commit is contained in:
Tim 2023-12-17 17:24:17 +01:00
parent 0463cb109f
commit 4738923be6

View file

@ -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 (