diff --git a/jwerty.js b/jwerty.js index 8107bbf..34936f0 100644 --- a/jwerty.js +++ b/jwerty.js @@ -449,7 +449,7 @@ // For each property in the jwertyCode object, compare to `event` for (var p in jwertyCode[n]) { // ...except for jwertyCode.jwertyCombo... - if (p !== 'jwertyCombo' && event[p] != jwertyCode[n][p]) returnValue = false; + if (p !== 'jwertyCombo' && event[p] !== undefined && event[p] != jwertyCode[n][p]) returnValue = false; } // If this jwertyCode optional wasn't falsey, then we can return early. if (returnValue !== false) return returnValue; @@ -537,4 +537,4 @@ KEYS: _keys }; -}(typeof global !== 'undefined' && global.window || this, (typeof module !== 'undefined' && module.exports ? module.exports : this))); \ No newline at end of file +}(typeof global !== 'undefined' && global.window || this, (typeof module !== 'undefined' && module.exports ? module.exports : this)));