From 1aff6f3d5269500811cae7500493060b62b3c8f2 Mon Sep 17 00:00:00 2001 From: Florrie Date: Sun, 3 Sep 2017 13:39:38 -0300 Subject: Use hasOwnProperty() instead of keys().includes() --- src/keybinder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/keybinder.js b/src/keybinder.js index 1d80348..d6e0113 100644 --- a/src/keybinder.js +++ b/src/keybinder.js @@ -28,7 +28,7 @@ module.exports.compileKeybindings = function(bindings, commands) { const bufferParts = keys.map(item => { if (typeof item === 'number') { return [item] - } else if (Object.keys(simpleKeybindings).includes(item)) { + } else if (simpleKeybindings.hasOwnProperty(item)) { return simpleKeybindings[item] } else if (typeof item === 'string' && item.length === 1) { return [item.charCodeAt(0)] -- cgit 1.3.0-6-gf8a5