Skip to content

Commit

Permalink
Add null check
Browse files Browse the repository at this point in the history
  • Loading branch information
polypixeldev committed Nov 12, 2023
1 parent 6937bba commit 2f6cec7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions games/galactic.js
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,7 @@ onInput("i", () => {
currentOption = 1;
break;
case upgrade:
if (!prevSelectedTile) return;
const upgarde = upgrades[prevSelectedTile.type];
if (!upgarde) {
playTune(removeTune);
Expand Down

0 comments on commit 2f6cec7

Please sign in to comment.