Skip to content

Commit

Permalink
fix(variables): add nil check for variable arguments (influxdata#17342)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlirieGray authored Mar 19, 2020
1 parent 6ad8da1 commit bab2028
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion variable.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (m *Variable) Valid() error {
"query": true,
}

if !validTypes[m.Arguments.Type] {
if m.Arguments == nil || !validTypes[m.Arguments.Type] {
return fmt.Errorf("invalid arguments type")
}

Expand Down

0 comments on commit bab2028

Please sign in to comment.