Merge pull request #132 from toeverything/fix/deal-reference-warning

fix(Reference): add robust judgment
This commit is contained in:
Chi Zhang 2022-08-07 20:25:55 +08:00 committed by GitHub
commit 6b17c6b854
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 (