Skip to content

Commit

Permalink
chore: simplify conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
yanfali committed Nov 6, 2024
1 parent 0ad67a0 commit 4320f88
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/store/keycodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function getOSKeyboardLayout() {
let osKeyboardLayout = store.getters['app/osKeyboardLayout'];
if (
isUndefined(osKeyboardLayout) ||
!Object.keys(keymapExtras).includes(osKeyboardLayout)
!keymapExtras[osKeyboardLayout]
) {
const fallbackOSKeyboardLayout = 'keymap_us';
console.log(
Expand All @@ -39,8 +39,8 @@ function isANSI() {
function toLocaleKeycode(keycodeLUT, keycodeObject) {
console.assert(!isUndefined(keycodeLUT));
if (
!Object.keys(keycodeObject).includes('name') ||
!Object.keys(keycodeObject).includes('code')
!keycodeObject.name ||
!keycodeObject.code
) {
// Not an object describing a keyboard key; return as is
return keycodeObject;
Expand Down

0 comments on commit 4320f88

Please sign in to comment.