From a0777fb1d73f5a8b4d20ea19cec50ea60e18f4c3 Mon Sep 17 00:00:00 2001 From: Bobby Wibowo Date: Thu, 5 Nov 2020 23:10:22 +0700 Subject: [PATCH] fixed upload urls button not working would happen when in config uploads.urlMaxSize equals uploads.maxSize --- src/js/home.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/js/home.js b/src/js/home.js index ae94373..d87ab0e 100644 --- a/src/js/home.js +++ b/src/js/home.js @@ -270,7 +270,11 @@ page.prepareUpload = () => { page.urlMaxSize = parseInt(urlMaxSize.innerHTML) page.urlMaxSizeBytes = page.urlMaxSize * 1e6 urlMaxSize.innerHTML = page.getPrettyBytes(page.urlMaxSizeBytes) - document.querySelector('#uploadUrls').addEventListener('click', event => { + } + + const uploadUrls = document.querySelector('#uploadUrls') + if (uploadUrls) { + uploadUrls.addEventListener('click', event => { page.addUrlsToQueue() }) }