Browse Source

Fixed an error for areas with no actions

tags/v0.1.0
Fen Dweller 6 years ago
parent
commit
f4993e7bc2
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      world.js

+ 7
- 3
world.js View File

@@ -54,12 +54,16 @@ function resetControls(state) {
actionButtons = []; actionButtons = [];


if (state.player.location) { if (state.player.location) {
state.world[state.player.location].actions.forEach(action => {
actionButtons.push(undefined);
});
if (state.world[state.player.location].actions) {
state.world[state.player.location].actions.forEach(action => {
actionButtons.push(undefined);
});
}
} }






} }






Loading…
Cancel
Save