Skip to content

Commit

Permalink
Hoist keycodeLUT call out of map
Browse files Browse the repository at this point in the history
  • Loading branch information
precondition committed Aug 10, 2022
1 parent 90fdd37 commit 7b3f406
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/store/modules/keycodes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 7b3f406

Please sign in to comment.