Introduced use of conditional chaining operator

This commit is contained in:
n1474335 2022-10-28 13:24:03 +01:00
parent 570206af77
commit b92501ee35
14 changed files with 493 additions and 495 deletions

View file

@ -807,7 +807,7 @@ class InputWaiter {
// Dropped text is handled by the editor itself
if (e.dataTransfer.getData("Text")) return;
if (e.dataTransfer.files && e.dataTransfer.files.length > 0) {
if (e?.dataTransfer?.files?.length > 0) {
this.loadUIFiles(e.dataTransfer.files);
}
}