Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

simple unbind global leak fix #81

Merged
merged 1 commit into from

3 participants

@ryan-nauman

I noticed today that in the pull req I sent yesterday the mi variable is accidentally declared as a global.

@madrobby madrobby merged commit ddcb72e into from
@Yahasana

please update keymaster.min.js too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 27, 2013
  1. @ryan-nauman

    fix global `mi` leak

    ryan-nauman authored
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +3 −3 keymaster.js
View
6 keymaster.js
@@ -136,7 +136,7 @@
// 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;
@@ -144,7 +144,7 @@
}
// 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;
}
Something went wrong with that request. Please try again.