refactor useMetadata hook and minor fixes

This commit is contained in:
Ren Amamiya
2023-04-14 08:52:53 +07:00
parent 2fced53a60
commit cb35c70351
3 changed files with 49 additions and 28 deletions

View File

@@ -125,7 +125,9 @@ export default function EventCollector() {
if (unsubscribe.current) {
unsubscribe.current();
}
unlisten.current();
if (unlisten.current) {
unlisten.current;
}
};
}, [setHasNewerNote, subscribe, listenWindowClose]);