Permalink
Browse files

fix global `mi` leak

  • Loading branch information...
1 parent 4972b92 commit 1d01ca60513a7905d1cdbf247eed8e8e3c6de365 @ryan-nauman ryan-nauman committed Apr 27, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 keymaster.js
View
@@ -136,15 +136,15 @@
// parse and assign shortcut
function assignKey(key, scope, method){
- var keys, mods, i, mi;
+ var keys, mods;
keys = getKeys(key);
if (method === undefined) {
method = scope;
scope = 'all';
}
// for each shortcut
- for (i = 0; i < keys.length; i++) {
+ for (var i = 0; i < keys.length; i++) {
// set modifier keys if any
mods = [];
key = keys[i].split('+');
@@ -242,7 +242,7 @@
// abstract mods logic for assign and unassign
function getMods(key) {
var mods = key.slice(0, key.length - 1);
- for (mi = 0; mi < mods.length; mi++)
+ for (var mi = 0; mi < mods.length; mi++)
mods[mi] = _MODIFIERS[mods[mi]];
return mods;
}

1 comment on commit 1d01ca6

please update keymaster.min.js too

Please sign in to comment.