fix core error handling

This commit is contained in:
unclekingpin 2024-01-15 04:11:52 -08:00
parent abaac17c07
commit 682b58359c

View file

@ -146,10 +146,8 @@ const App = () => {
.catch((e) => console.error(e));
}
return () => {
if (services.core.active) {
window.removeEventListener('focus', onWindowFocus);
services.core.transport.off('CoreEvent', onCoreEvent);
}
window.removeEventListener('focus', onWindowFocus);
services.core.transport?.off('CoreEvent', onCoreEvent);
};
}, [initialized]);
return (