mirror of
https://github.com/outline/outline.git
synced 2026-12-05 18:55:10 +03:00
fix: Null reference (#12135)
* fix: Null reference * fix: Scope image click querySelector to editor view Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
1 parent
05da80d318
commit
ccbc9b75fc
1 file changed
+3
-3
@@ -254,10 +254,10 @@ export default class Image extends SimpleImage {
|
||||
if (selection instanceof NodeSelection) {
|
||||
const { node } = selection;
|
||||
if (node.type.name === "image") {
|
||||
const image = document.querySelector(
|
||||
const image = view.dom.querySelector<HTMLImageElement>(
|
||||
".ProseMirror-selectednode img"
|
||||
) as HTMLImageElement;
|
||||
image.click();
|
||||
);
|
||||
image?.click();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user