diff --git a/world.js b/world.js index 495ec65..951067c 100644 --- a/world.js +++ b/world.js @@ -54,12 +54,16 @@ function resetControls(state) { actionButtons = []; 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); + }); + } } + + }