Add debug UI trace for empty parsed images array

This commit is contained in:
Kroonk
2026-04-12 15:30:37 +02:00
parent 98c39f4b83
commit 1c233db10e
2 changed files with 6 additions and 1 deletions

View File

@@ -166,6 +166,11 @@
return imageExtensions.indexOf(ext) !== -1;
});
if (images.length === 0) {
$main.html('<p style="text-align:center;color:#fff;padding:2em;">JSON Array from Nginx was loaded, but 0 images matched!<br/>Raw files: ' + JSON.stringify(files) + '</p>');
return;
}
images.sort(function(a, b) {
return a.name.localeCompare(b.name);
});