Fix javascript bug in receive mode when files is disabled

This commit is contained in:
Micah Lee 2021-05-03 17:43:39 -07:00
parent b630a92d5e
commit 6a9878a33e
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -15,10 +15,10 @@ $(function () {
var formData = new FormData();
// Files
var filenames = [];
var $fileSelect = $('#file-select');
if ($fileSelect.length > 0) {
var files = $fileSelect.get(0).files;
var filenames = [];
for (var i = 0; i < files.length; i++) {
var file = files[i];
filenames.push(file.name);