« get me outta code hell

Use hasOwnProperty() instead of keys().includes() - http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2017-09-03 13:39:38 -0300
committerFlorrie <towerofnix@gmail.com>2017-09-03 13:39:45 -0300
commit1aff6f3d5269500811cae7500493060b62b3c8f2 (patch)
tree6bc09b6a0b58f08a33ea1eae56bd9cb254c4fa17
parent7b4916c4c59c95a8c0e4fb558f4305cd63a3b578 (diff)
Use hasOwnProperty() instead of keys().includes()
-rw-r--r--src/keybinder.js2
1 files changed, 1 insertions, 1 deletions
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)]