diff --git a/dev/src/ExpressionLexer.js b/dev/src/ExpressionLexer.js index 4e80fef8..95098bd1 100644 --- a/dev/src/ExpressionLexer.js +++ b/dev/src/ExpressionLexer.js @@ -685,7 +685,7 @@ export default class ExpressionLexer { let end = str.indexOf("}", i + 1); token.l += end - i; let arr = str.substring(i + 1, end).split(","); - token.min = parseInt(arr[0]); + token.min = parseInt(arr[0]) ?? 0; token.max = (arr[1] === undefined) ? token.min : (arr[1] === "") ? -1 : parseInt(arr[1]); if (token.max !== -1 && token.min > token.max) { token.error = {id: "quantrev"}; @@ -722,4 +722,4 @@ ExpressionLexer.ANCHOR_TYPES = { "wordboundary": true, "notwordboundary": true, "prevmatchend": true -} \ No newline at end of file +}