Skip to content

Commit

Permalink
fix: don't recreate the AST is AST is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
saffage committed May 9, 2024
1 parent 57501b9 commit e9e4db4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/jet/jet.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ func process(
return
}

if nodeList == nil {
return
}

fmt.Println("recreated AST:")
for i, node := range nodeList.Nodes {
if _, isEmpty := node.(*ast.Empty); i < len(nodeList.Nodes)-1 || !isEmpty {
Expand Down

0 comments on commit e9e4db4

Please sign in to comment.