Skip to content

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.

fix(Reference): add robust judgment

tzhangchi450a54bcb925
diff --git a/libs/components/editor-plugins/src/menu/reference-menu/ReferenceMenu.tsx b/libs/components/editor-plugins/src/menu/reference-menu/ReferenceMenu.tsx
index cbd443927a..accd73849b 100644
--- a/libs/components/editor-plugins/src/menu/reference-menu/ReferenceMenu.tsx
+++ b/libs/components/editor-plugins/src/menu/reference-menu/ReferenceMenu.tsx
@@ -116,7 +116,7 @@ export const ReferenceMenu = ({ editor, hooks, style }: ReferenceMenuProps) => {
};
const handle_close = () => {
- editor.blockHelper.removeSearchSlash(block_id);
+ block_id && editor.blockHelper.removeSearchSlash(block_id);
};
return (