opti: 1.adjust eventlistener;

This commit is contained in:
mitsuha 2022-08-24 09:08:12 +08:00
parent a07c865161
commit c4de1a6061

View File

@ -93,6 +93,7 @@ const getPageTOC = (asyncBlocks: AsyncBlock[], tocContents): TocType[] => {
/* destroy page/block update-listener */ /* destroy page/block update-listener */
const destroyEventList = (): boolean => { const destroyEventList = (): boolean => {
const eventListeners = listenerMap.values(); const eventListeners = listenerMap.values();
listenerMap.clear();
for (const eventListener of eventListeners) { for (const eventListener of eventListeners) {
eventListener?.(); eventListener?.();