Merge branch 'fix/page-plugin' of github.com:toeverything/AFFiNE into fix/page-plugin

This commit is contained in:
DiamondThree
2022-08-09 17:44:48 +08:00
2 changed files with 2 additions and 2 deletions

View File

@@ -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;
}

View File

@@ -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;
}