Merge pull request #135 from derpibooru/fetch_no_error_msg_bug

Fixes #134
This commit is contained in:
alpacawren 2020-06-09 00:56:54 -04:00 committed by GitHub
commit ccd35f4d07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;