diff --git a/shared/editor/nodes/Image.tsx b/shared/editor/nodes/Image.tsx index 71aa769431..489e1d68b8 100644 --- a/shared/editor/nodes/Image.tsx +++ b/shared/editor/nodes/Image.tsx @@ -365,6 +365,9 @@ export default class Image extends SimpleImage { ({ getPos, view }: ComponentProps) => () => { const { commands } = this.editor; + if (!commands.editDiagram) { + return; + } const pos = getPos(); const $pos = view.state.doc.resolve(pos); view.dispatch(view.state.tr.setSelection(new NodeSelection($pos)));