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.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
chore: prefer const
Whitewater81867d85e3ac
diff --git a/libs/components/editor-plugins/src/menu/command-menu/Menu.tsx b/libs/components/editor-plugins/src/menu/command-menu/Menu.tsxindex 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<HTMLDivElement>) => {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.tsxindex 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;}