From e6c86602eedf3e021522f42c2373445245811217 Mon Sep 17 00:00:00 2001 From: Wes Date: Fri, 17 May 2024 12:49:20 -0700 Subject: [PATCH] fix: skip nil decls when building verb schema (#1532) --- backend/controller/console.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/backend/controller/console.go b/backend/controller/console.go index 990f04a825..03ff6b6754 100644 --- a/backend/controller/console.go +++ b/backend/controller/console.go @@ -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()