From 6a9878a33e347f499c53e8a05e9f234ea609e3a1 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Mon, 3 May 2021 17:43:39 -0700 Subject: [PATCH] Fix javascript bug in receive mode when files is disabled --- cli/onionshare_cli/resources/static/js/receive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/onionshare_cli/resources/static/js/receive.js b/cli/onionshare_cli/resources/static/js/receive.js index f4bdedec..487b8e1d 100644 --- a/cli/onionshare_cli/resources/static/js/receive.js +++ b/cli/onionshare_cli/resources/static/js/receive.js @@ -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);