Skip to content

Commit

Permalink
fixed crash bug for first run
Browse files Browse the repository at this point in the history
  • Loading branch information
Spentine committed Jun 17, 2024
1 parent 53f24a4 commit 1109e05
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,13 @@ try {
} catch {
console.log("Unable to read blockStackerStorage");
localStorage.setItem("blockStacker", "{}");
saveBlockStackerStorage();
}

if (blockStackerStorage.userSettings) {
userSettings = blockStackerStorage.userSettings;
}

saveBlockStackerStorage();

var game = null;
const inputHandler = new InputHandler(keyMappings);
const renderer = new GameRenderer();
Expand Down

0 comments on commit 1109e05

Please sign in to comment.