From 43fde41e29d4df47327a394e5408b30667978dc8 Mon Sep 17 00:00:00 2001 From: Wren Date: Tue, 9 Jun 2020 00:15:58 -0400 Subject: [PATCH] Fixes #134 --- assets/js/upload.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/assets/js/upload.js b/assets/js/upload.js index db5cba82..fb2ec854 100644 --- a/assets/js/upload.js +++ b/assets/js/upload.js @@ -81,7 +81,11 @@ function setupImageUpload() { disableFetch(); scrapeUrl(remoteUrl.value).then(data => { - if (data.errors && data.errors.length > 0) { + if (data == null) { + scraperError.innerText = "No image found at that address."; + showError(); + return; + } else if (data.errors && data.errors.length > 0) { scraperError.innerText = data.errors.join(' '); showError(); return;