make aspect ratio overlay work regardless of selected localization

This commit is contained in:
AUTOMATIC
2022-10-21 17:11:42 +03:00
parent 02e4d4694d
commit 704036ff07
3 changed files with 20 additions and 22 deletions

View File

@@ -43,7 +43,7 @@ function dropReplaceImage( imgWrap, files ) {
window.document.addEventListener('dragover', e => {
const target = e.composedPath()[0];
const imgWrap = target.closest('[data-testid="image"]');
if ( !imgWrap && target.placeholder.indexOf("Prompt") == -1) {
if ( !imgWrap && target.placeholder && target.placeholder.indexOf("Prompt") == -1) {
return;
}
e.stopPropagation();