diff --git a/src/main.ts b/src/main.ts index 993bd1018ae..64dde996f92 100644 --- a/src/main.ts +++ b/src/main.ts @@ -99,13 +99,16 @@ const startGame = async (manifest?: any) => { } }; +let manifest: any; fetch("/manifest.json") .then(res => res.json()) .then(jsonResponse => { - startGame(jsonResponse.manifest); - }).catch(() => { - // Manifest not found (likely local build) - startGame(); + manifest = jsonResponse.manifest; + }).catch(err => { + // Manifest not found (likely local build or error path on live) + console.log(`Manifest not found. ${err}`); + }).finally(() => { + startGame(manifest); }); export default game;