Fix single-digit integer parse (!)
This commit is contained in:
parent
79724cc449
commit
45d6a8e6e5
@ -8,7 +8,7 @@
|
||||
* @param {string} value
|
||||
*/
|
||||
function strictParseInt(value) {
|
||||
if (/^([1-9][0-9]+)$/.test(value))
|
||||
if (/^([1-9][0-9]*)$/.test(value))
|
||||
return Number(value);
|
||||
return NaN;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user