log manifest image load errors, instead of crash

This commit is contained in:
Emi Matchu 2020-09-22 04:12:52 -07:00
parent 8cc034900d
commit 3fe2c478f2

View file

@ -384,7 +384,9 @@ async function loadMovieLibrary(librarySrc) {
const manifestImages = new Map( const manifestImages = new Map(
library.properties.manifest.map(({ id, src }) => [ library.properties.manifest.map(({ id, src }) => [
id, id,
loadImage(safeImageUrl(librarySrcDir + "/" + src)), loadImage(safeImageUrl(librarySrcDir + "/" + src)).catch((e) => {
console.error("Error loading image for movie manifest", e);
}),
]) ])
); );
await Promise.all(manifestImages.values()); await Promise.all(manifestImages.values());