client/upload: don't call emitFiles when there are none

This commit is contained in:
neobooru 2021-06-04 20:25:41 +02:00
parent 4e8f72fb87
commit 9eb128bf05

View file

@ -139,7 +139,7 @@ class FileDropperControl extends events.EventTarget {
if (!this._options.allowMultiple && fileList.length > 1) { if (!this._options.allowMultiple && fileList.length > 1) {
window.alert("Cannot select multiple files."); window.alert("Cannot select multiple files.");
} else { } else if (fileList.length > 0) {
this._emitFiles(fileList); this._emitFiles(fileList);
} }
} }