From 7b3f406803fc6a574b47a9e3e87b5f367098f131 Mon Sep 17 00:00:00 2001 From: precondition <57645186+precondition@users.noreply.github.com> Date: Wed, 10 Aug 2022 12:36:15 +0200 Subject: [PATCH] Hoist keycodeLUT call out of map --- src/store/modules/keycodes/index.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/store/modules/keycodes/index.js b/src/store/modules/keycodes/index.js index 50854bc402..7eea9e542a 100644 --- a/src/store/modules/keycodes/index.js +++ b/src/store/modules/keycodes/index.js @@ -71,12 +71,8 @@ function generateKeycodes(osKeyboardLayout, isSteno) { ); return keycodes; } - return keycodes.map((keycodeObject) => - toLocaleKeycode( - keymapExtras[getOSKeyboardLayout()].keycodeLUT, - keycodeObject - ) - ); + const { keycodeLUT } = keymapExtras[getOSKeyboardLayout()]; + return keycodes.map(keycodeObject => toLocaleKeycode(keycodeLUT, keycodeObject)); } const getters = {