mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 23:02:27 +01:00
Prevent infinite loops when trying to execute mappings recursively.
This commit is contained in:
@@ -387,7 +387,7 @@ var Modes = Module("modes", {
|
||||
}, options);
|
||||
},
|
||||
|
||||
toString: function () this.name,
|
||||
get toStringParams() [this.name],
|
||||
|
||||
valueOf: function () this.id,
|
||||
|
||||
@@ -411,14 +411,14 @@ var Modes = Module("modes", {
|
||||
}),
|
||||
StackElement: (function () {
|
||||
const StackElement = Struct("main", "extended", "params", "saved");
|
||||
StackElement.className = "Modes.StackElement";
|
||||
StackElement.defaultValue("params", function () this.main.params);
|
||||
|
||||
update(StackElement.prototype, {
|
||||
toString: function () !loaded.modes ? this.main : "[mode " +
|
||||
this.main.name +
|
||||
(!this.extended ? "" :
|
||||
"(" + modes.all.filter(function (m) this.extended & m)
|
||||
.join("|") +
|
||||
")") + "]"
|
||||
get toStringParams() !loaded.modes ? this.main.name : [
|
||||
this.main.name,
|
||||
<>({ modes.all.filter(function (m) this.extended & m, this).map(function (m) m.name).join("|") })</>
|
||||
]
|
||||
});
|
||||
return StackElement;
|
||||
})(),
|
||||
|
||||
Reference in New Issue
Block a user