1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 22:57:58 +01:00

Fix typo in Modes#remove.

Fixes :emenu among others.

--HG--
extra : amend_source : 528ad572b008870e4d07de176418a002a19632fe
This commit is contained in:
Doug Kearns
2014-02-23 23:12:06 +11:00
parent aac2944c2a
commit fbed9ec4af

View File

@@ -275,8 +275,9 @@ var Modes = Module("modes", {
if (covert && this.topOfStack.main != mode) { if (covert && this.topOfStack.main != mode) {
util.assert(mode != this.NORMAL); util.assert(mode != this.NORMAL);
for (let m; m = this.modeStack.find(m => m.main == mode);) let i = this._modeStack.findIndex(m => m.main == mode);
this._modeStack.splice(this._modeStack.indexOf(m)); if (i >= 0)
this._modeStack.splice(i);
} }
else if (this.stack.some(m => m.main == mode)) { else if (this.stack.some(m => m.main == mode)) {
this.pop(mode); this.pop(mode);