Skip to content

Commit

Permalink
fix: skip nil decls when building verb schema (#1532)
Browse files Browse the repository at this point in the history
  • Loading branch information
wesbillman authored May 17, 2024
1 parent dce2ea4 commit e6c8660
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions backend/controller/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ func visitNode(sch *schema.Schema, n schema.Node, verbString *string) error {
switch n := n.(type) {
case *schema.Ref:
decl := sch.ResolveRef(n)
*verbString += decl.String() + "\n\n"
err := visitNode(sch, decl, verbString)
if err != nil {
return err
if decl != nil {
*verbString += decl.String() + "\n\n"
err := visitNode(sch, decl, verbString)
if err != nil {
return err
}
}

default:
}
return next()
Expand Down

0 comments on commit e6c8660

Please sign in to comment.