We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a98c46 commit 9275c67Copy full SHA for 9275c67
src/parser.js
@@ -21,7 +21,7 @@ function isLetter(c) {
21
function matchInteger(s) {
22
if (typeof s === 'number' || s instanceof Number) {
23
return true;
24
- } else if (typeof s === 'string' || s instanceof String) {
+ } else if (typeof s === 'string' || s instanceof String && s.length !== 0) {
25
for (let i = s.length - 1; i >= 0; --i) {
26
if (!isNumber(s.charAt(i))) {
27
return false;
0 commit comments