mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 13:37:58 +01:00
Fix some more stupid bugs in newer JägerMonkey.
This commit is contained in:
@@ -157,7 +157,7 @@ const Command = Class("Command", {
|
|||||||
*/
|
*/
|
||||||
hasName: function (name) {
|
hasName: function (name) {
|
||||||
return this.specs.some(function (spec) {
|
return this.specs.some(function (spec) {
|
||||||
let [, head, tail] = spec.match(/([^[]+)(?:\[(.*)])?/);
|
let [, head, tail] = /([^[]+)(?:\[(.*)])?/.exec(spec);
|
||||||
return name.indexOf(head) == 0 && (head + (tail || "")).indexOf(name) == 0;
|
return name.indexOf(head) == 0 && (head + (tail || "")).indexOf(name) == 0;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -292,7 +292,7 @@ const Command = Class("Command", {
|
|||||||
*/
|
*/
|
||||||
parseSpecs: function parseSpecs(specs) {
|
parseSpecs: function parseSpecs(specs) {
|
||||||
return specs.map(function (spec) {
|
return specs.map(function (spec) {
|
||||||
let [, head, tail] = spec.match(/([^[]+)(?:\[(.*)])?/);
|
let [, head, tail] = /([^[]+)(?:\[(.*)])?/.exec(spec);
|
||||||
return tail ? [head + tail, head] : [head];
|
return tail ? [head + tail, head] : [head];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user