From 571b064fb5985c43d231fb00596df4cda890fb81 Mon Sep 17 00:00:00 2001 From: Matchu Date: Mon, 26 Apr 2021 06:48:33 -0700 Subject: [PATCH] Oops, fix crash for empty manifests! Lol whoops I goofed up what happens when there's no manifest! Ooops --- src/server/types/AppearanceLayer.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/server/types/AppearanceLayer.js b/src/server/types/AppearanceLayer.js index d9a5323..bf26f8e 100644 --- a/src/server/types/AppearanceLayer.js +++ b/src/server/types/AppearanceLayer.js @@ -407,9 +407,8 @@ async function loadAndCacheAssetDataFromManifest(db, layer) { manifest = await loadAndCacheAssetManifest(db, layer); } - // If we have an empty copy of the manifest ("" means 404 etc, or it can be - // actually empty), return empty data. - if (manifest === "" && manifest.assets.length !== 1) { + // If we have an empty copy of the manifest, return empty data. + if (!manifest || manifest.assets.length !== 1) { return { format: null, assetUrls: [] }; }