diff --git a/libs/components/editor-plugins/src/menu/command-menu/Menu.tsx b/libs/components/editor-plugins/src/menu/command-menu/Menu.tsx index 8daf2c2b92..b6d174e513 100644 --- a/libs/components/editor-plugins/src/menu/command-menu/Menu.tsx +++ b/libs/components/editor-plugins/src/menu/command-menu/Menu.tsx @@ -83,7 +83,7 @@ export const CommandMenu = ({ editor, hooks, style }: CommandMenuProps) => { async (event: React.KeyboardEvent) => { const { type, anchorNode } = editor.selection.currentSelectInfo; // console.log(await editor.getBlockById(anchorNode.id)); - let activeBlock = await editor.getBlockById(anchorNode.id); + const activeBlock = await editor.getBlockById(anchorNode.id); if (activeBlock.type === Protocol.Block.Type.page) { return; } diff --git a/libs/components/editor-plugins/src/menu/inline-menu/Container.tsx b/libs/components/editor-plugins/src/menu/inline-menu/Container.tsx index 2023c4215b..f515f81141 100644 --- a/libs/components/editor-plugins/src/menu/inline-menu/Container.tsx +++ b/libs/components/editor-plugins/src/menu/inline-menu/Container.tsx @@ -26,7 +26,7 @@ export const InlineMenuContainer = ({ editor }: InlineMenuContainerProps) => { const unsubscribe = editor.selection.onSelectEnd(async info => { const { type, browserSelection, anchorNode } = info; if (anchorNode) { - let activeBlock = await editor.getBlockById(anchorNode.id); + const activeBlock = await editor.getBlockById(anchorNode.id); if (activeBlock.type === Protocol.Block.Type.page) { return; }