From 9d859d4fd3d70173b1e7edb7c5df4e4806301941 Mon Sep 17 00:00:00 2001 From: MrTimscampi Date: Fri, 10 Apr 2020 22:58:18 +0200 Subject: [PATCH] Fetch action only once in inputManager --- src/scripts/inputManager.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/scripts/inputManager.js b/src/scripts/inputManager.js index cbbece63bc..1f65230154 100644 --- a/src/scripts/inputManager.js +++ b/src/scripts/inputManager.js @@ -227,10 +227,11 @@ import appHost from 'apphost'; } })[command]; - if (keyActions(commandName) === undefined) { - console.debug(`inputManager: tried to process command with no action assigned: ${commandName}`); + const action = keyActions(commandName); + if (action !== undefined) { + action.call(); } else { - keyActions(commandName).call(); + console.debug(`inputManager: tried to process command with no action assigned: ${commandName}`); } }