Fix typo in utils customKeys (#2283)

This commit is contained in:
Alexandre Santos 2017-09-25 14:21:59 +01:00 committed by Guillermo Rauch
parent a31e94eb5a
commit acc2230b0e

View file

@ -21,23 +21,23 @@ const _setCommandsForKeys = function (commands) {
} }
}; };
const _import = function (customsKeys) { const _import = function (customKeys) {
try { try {
const mapping = JSON.parse(readFileSync(defaultPlatformKeyPath())); const mapping = JSON.parse(readFileSync(defaultPlatformKeyPath()));
_setKeysForCommands(mapping); _setKeysForCommands(mapping);
_setKeysForCommands(customsKeys); _setKeysForCommands(customKeys);
_setCommandsForKeys(commands); _setCommandsForKeys(commands);
return {commands, keys}; return {commands, keys};
} catch (err) {} } catch (err) {}
}; };
const _extend = function (customsKeys) { const _extend = function (customKeys) {
if (customsKeys) { if (customKeys) {
for (const command in customsKeys) { for (const command in customKeys) {
if (command) { if (command) {
commands[command] = normalize(customsKeys[command]); commands[command] = normalize(customKeys[command]);
keys[normalize(customsKeys[command])] = command; keys[normalize(customKeys[command])] = command;
} }
} }
} }