mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-30 20:02:27 +01:00
Fix setting "number" options.
--HG-- extra : rebase_source : 037b69f01b7501978e2c61037c26f9dde55192d7
This commit is contained in:
@@ -421,7 +421,7 @@ const Option = Class("Option", {
|
||||
|
||||
number: function (operator, values, scope, invert) {
|
||||
// TODO: support floats? Validators need updating.
|
||||
if (!/^[+-]?(?:0x[0-9a-f]+|0[0-7]*|[1-9]+)$/i.test(values))
|
||||
if (!/^[+-]?(?:0x[0-9a-f]+|0[0-7]*|[1-9][0-9]*)$/i.test(values))
|
||||
return "E521: Number required after := " + this.name + "=" + values;
|
||||
|
||||
let value = parseInt(values);
|
||||
|
||||
Reference in New Issue
Block a user