Use obj.map (can’t use obj.values)

This commit is contained in:
Eric Rosenbaum 2018-05-02 09:52:04 -04:00
parent 85ac307261
commit 23dd898daf

View file

@ -85,7 +85,7 @@ class Keyboard {
keyArg = Cast.toString(keyArg);
// If the arg matches a special key name, return it.
const keyNameList = Object.values(Keyboard.KEY_NAMES);
const keyNameList = Object.keys(Keyboard.KEY_NAMES).map(name => Keyboard.KEY_NAMES[name]);
if (keyNameList.includes(keyArg)) {
return keyArg;
}