Commit aa71ff28 authored by Ben Hayward's avatar Ben Hayward

Fixed null images causing error

1 merge request!531[Sprint/ModestMonkey](fix): Return void if there is no selected or deselected image
Pipeline #79793960 passed with stages
in 51 minutes and 22 seconds
......@@ -237,7 +237,7 @@ export class EmbedImage {
public selectImage(e) {
let $image = e.target;
if (!$image || !$image.tagname) {
if (!$image || $image.tagname === null) {
return;
}
......@@ -274,7 +274,7 @@ export class EmbedImage {
let $el = e.target,
$image = document.querySelector('.medium-insert-image-active');
if (!$el || !$el.tagname) {
if (!$image || !$el || $el.tagname === null) {
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment