diff --git a/src/event/Key.js b/src/event/Key.js index 85342afe..8af273a5 100644 --- a/src/event/Key.js +++ b/src/event/Key.js @@ -63,8 +63,7 @@ var Key = new function() { // based on whichever key is used for commands. command: { get: function() { - var browser = paper.browser; - return browser.mac ? this.meta : this.control; + return paper.browser.mac ? this.meta : this.control; } } }); @@ -104,8 +103,7 @@ var Key = new function() { // Detect modifiers and mark them as pressed / released if (key.length > 1 && (name = Base.camelize(key)) in modifiers) { modifiers[name] = down; - var browser = paper.browser; - if (name === 'meta' && browser && browser.mac) { + if (name === 'meta' && paper.browser.mac) { // Fix a strange behavior on Mac where no keyup events are // received for any keys pressed while the meta key is down. // Keep track of the normal keys being pressed and trigger keyup