From f4993e7bc258be1209dcae1ac8803ea942bc11e9 Mon Sep 17 00:00:00 2001 From: Fen Dweller Date: Sun, 13 Jan 2019 12:55:53 -0500 Subject: [PATCH] Fixed an error for areas with no actions --- world.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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); + }); + } } + + }