mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 23:07:59 +01:00
Fix typo in Modes#remove.
Fixes :emenu among others. --HG-- extra : amend_source : 528ad572b008870e4d07de176418a002a19632fe
This commit is contained in:
@@ -275,8 +275,9 @@ var Modes = Module("modes", {
|
||||
if (covert && this.topOfStack.main != mode) {
|
||||
util.assert(mode != this.NORMAL);
|
||||
|
||||
for (let m; m = this.modeStack.find(m => m.main == mode);)
|
||||
this._modeStack.splice(this._modeStack.indexOf(m));
|
||||
let i = this._modeStack.findIndex(m => m.main == mode);
|
||||
if (i >= 0)
|
||||
this._modeStack.splice(i);
|
||||
}
|
||||
else if (this.stack.some(m => m.main == mode)) {
|
||||
this.pop(mode);
|
||||
|
||||
Reference in New Issue
Block a user