Skip to content

Commit

Permalink
fix: handle undefined props as null #deploy_branch
Browse files Browse the repository at this point in the history
  • Loading branch information
lostfields committed Feb 29, 2024
1 parent 8b17a0a commit 0d1f506
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/linq/peg/reducervisitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,9 @@ export class ReducerVisitor extends ExpressionVisitor {


// this object
if(isRecord(currentScope) && identifier.name in currentScope && (value = currentScope[identifier.name]) !== undefined) {
if(isRecord(currentScope) && identifier.name in currentScope) {
value = currentScope[identifier.name]

if(value == null)
return new LiteralExpression(null)

Expand Down

0 comments on commit 0d1f506

Please sign in to comment.