Skip to content

Commit

Permalink
Revert "make manifest fix more future proof"
Browse files Browse the repository at this point in the history
This reverts commit 32591b3.
  • Loading branch information
MokaStitcher committed Oct 27, 2024
1 parent 32591b3 commit 06ad6c0
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,13 @@ const startGame = async (manifest?: any) => {
}
};

let manifest: any;
fetch("/manifest.json")
.then(res => res.json())
.then(jsonResponse => {
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);
startGame(jsonResponse.manifest);
}).catch(() => {
// Manifest not found (likely local build)
startGame();
});

export default game;

0 comments on commit 06ad6c0

Please sign in to comment.