From 450a54bcb92522599f080201a245ec1af7c8926f Mon Sep 17 00:00:00 2001 From: tzhangchi Date: Sun, 7 Aug 2022 19:24:39 +0800 Subject: [PATCH] fix(Reference): add robust judgment --- .../editor-plugins/src/menu/reference-menu/ReferenceMenu.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 (