mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-16 07:46:58 -04:00
Return empty if image not found
This commit is contained in:
parent
060b234731
commit
935cc36612
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user