mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 22:38:56 +08:00
fix(nbstore): leave awareness when destroy (#10394)
This commit is contained in:
@@ -61,6 +61,11 @@ export class AwarenessFrontend {
|
||||
handleSyncCollect
|
||||
);
|
||||
|
||||
awareness.once('destroy', () => {
|
||||
awareness.off('update', handleAwarenessUpdate);
|
||||
unsubscribe();
|
||||
});
|
||||
|
||||
return () => {
|
||||
awareness.off('update', handleAwarenessUpdate);
|
||||
unsubscribe();
|
||||
|
||||
Reference in New Issue
Block a user