diff --git a/images.html b/images.html index f93091ecabe0884e0568983be6446f4e1a0d0756..e2ceb5e8fa2573fc8c859b04c3988c8678eb5acc 100644 --- a/images.html +++ b/images.html @@ -183,9 +183,14 @@ $.get(targeturl(), 'text') .done(function(html) { - parseFilenamesFromHtml(html).forEach(function(filename) { - $('#images').append(template({filename: filename})); - }); + var filenames = parseFilenamesFromHtml(html) + if (filenames.length) { + filenames.forEach(function(filename) { + $('#images').append(template({filename: filename})); + }); + } else { + handleError('no images found'); + } }) .fail(function(error) { handleError(error);