Skip to content

Commit

Permalink
require state key to be present
Browse files Browse the repository at this point in the history
  • Loading branch information
nyobe committed Jan 22, 2025
1 parent 58732fa commit 7333173
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ast/expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ func parseRotate(node *syntax.ObjectNode, name *StringExpr, args Expr) (Expr, sy
}

state, ok := stateExpr.(*ObjectExpr)
if !ok && state != nil {
if !ok {
diags.Extend(ExprError(stateExpr, "rotation state must be an object literal"))
}

Expand Down Expand Up @@ -810,7 +810,7 @@ func parseShortRotate(node *syntax.ObjectNode, name *StringExpr, args Expr) (Exp
}

state, ok := stateExpr.(*ObjectExpr)
if !ok && state != nil {
if !ok {
diags.Extend(ExprError(stateExpr, "rotation state must be an object literal"))
}

Expand Down

0 comments on commit 7333173

Please sign in to comment.