Simplify global key down emit check

This commit is contained in:
dominic 2018-02-25 21:16:05 +08:00
parent 9af8cdcea6
commit af7d619dc3

View file

@ -364,7 +364,7 @@ var KeyboardManager = new Class({
if (event.type === 'keydown')
{
if (KeyMap[code] && (keys[code] === undefined || (keys[code] && keys[code].isDown === false)))
if (KeyMap[code] && (keys[code] === undefined || keys[code].isDown === false))
{
// Will emit a keyboard or keyup event
this.emit(event.type, event);