mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 10:21:35 +03:00
opti: 1.adjust eventlistener;
This commit is contained in:
parent
a07c865161
commit
c4de1a6061
@ -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?.();
|
||||||
|
Loading…
Reference in New Issue
Block a user