Return empty if image not found

This commit is contained in:
Jaifroid 2023-11-04 10:53:24 +00:00
parent 060b234731
commit 935cc36612

View File

@ -109,6 +109,11 @@ function extractImages (images, callback) {
// Zimit files store URLs encoded!
if (params.zimType === 'zimit') title = encodeURI(title);
appstate.selectedArchive.getDirEntryByPath(title).then(function (dirEntry) {
if (!dirEntry) {
console.warn('Could not find DirEntry for image: ' + title);
checkBatch();
return;
}
return appstate.selectedArchive.readBinaryFile(dirEntry, function (fileDirEntry, content) {
image.style.background = '';
var mimetype = dirEntry.getMimetype();