Update ui.js

This commit is contained in:
J.K.SAGE 2024-01-18 19:30:24 +08:00 committed by GitHub
parent 59360fb047
commit 10d1b46cfd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -590,10 +590,12 @@ class PeerUI {
_onFilesSelected(e) { _onFilesSelected(e) {
const $input = e.target; const $input = e.target;
const files = $input.files; const files = $input.files;
if (files.length > 0) {
Events.fire('files-selected', { Events.fire('files-selected', {
files: files, files: files,
to: this._peer.id to: this._peer.id
}); });
}
$input.files = null; // reset input $input.files = null; // reset input
} }