Oops, fix crash for empty manifests!

Lol whoops I goofed up what happens when there's no manifest! Ooops
This commit is contained in:
Emi Matchu 2021-04-26 06:48:33 -07:00
parent d98a533dce
commit 571b064fb5

View file

@ -407,9 +407,8 @@ async function loadAndCacheAssetDataFromManifest(db, layer) {
manifest = await loadAndCacheAssetManifest(db, layer); manifest = await loadAndCacheAssetManifest(db, layer);
} }
// If we have an empty copy of the manifest ("" means 404 etc, or it can be // If we have an empty copy of the manifest, return empty data.
// actually empty), return empty data. if (!manifest || manifest.assets.length !== 1) {
if (manifest === "" && manifest.assets.length !== 1) {
return { format: null, assetUrls: [] }; return { format: null, assetUrls: [] };
} }