There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
fix(nbstore): leave awareness when destroy (#10394)
EYHNa59e6404234a
diff --git a/packages/common/nbstore/src/frontend/awareness.ts b/packages/common/nbstore/src/frontend/awareness.tsindex 6b0f22bee8..0badfa2991 100644--- a/packages/common/nbstore/src/frontend/awareness.ts+++ b/packages/common/nbstore/src/frontend/awareness.ts@@ -61,6 +61,11 @@ export class AwarenessFrontend {handleSyncCollect);+ awareness.once('destroy', () => {+ awareness.off('update', handleAwarenessUpdate);+ unsubscribe();+ });+return () => {awareness.off('update', handleAwarenessUpdate);unsubscribe();