mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
fix(core): missing clean up subscription (#10636)
This commit is contained in:
@@ -54,7 +54,6 @@ export const EditorChatPanel = forwardRef(function EditorChatPanel(
|
||||
chatPanelRef.current = new ChatPanel();
|
||||
chatPanelRef.current.host = editor.host;
|
||||
chatPanelRef.current.doc = editor.doc;
|
||||
containerRef.current?.append(chatPanelRef.current);
|
||||
const searchService = framework.get(AINetworkSearchService);
|
||||
const docDisplayMetaService = framework.get(DocDisplayMetaService);
|
||||
const workspaceService = framework.get(WorkspaceService);
|
||||
@@ -101,6 +100,7 @@ export const EditorChatPanel = forwardRef(function EditorChatPanel(
|
||||
SpecProvider._.getSpec('preview:page')
|
||||
);
|
||||
chatPanelRef.current.previewSpecBuilder = previewSpecBuilder;
|
||||
containerRef.current?.append(chatPanelRef.current);
|
||||
} else {
|
||||
chatPanelRef.current.host = editor.host;
|
||||
chatPanelRef.current.doc = editor.doc;
|
||||
|
||||
Reference in New Issue
Block a user