Skip to content

Commit

Permalink
fixes for updated typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
sehugg committed Sep 13, 2023
1 parent ac9c143 commit 0bf41a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/basic/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ export class BASICParser {
for (var arrdim of arr.args) {
if (arrdim.valtype != 'number')
this.compileError(`Array dimensions must be numeric.`, arrdim.$loc);
if (isLiteral(arrdim) && arrdim.value < this.opts.defaultArrayBase)
if (isLiteral(arrdim) && typeof arrdim.value === 'number' && arrdim.value < this.opts.defaultArrayBase)
this.compileError(`An array dimension cannot be less than ${this.opts.defaultArrayBase}.`, arrdim.$loc);
}
});
Expand Down

0 comments on commit 0bf41a3

Please sign in to comment.