Skip to content

Commit

Permalink
Check in a place where Entity might be nil now.
Browse files Browse the repository at this point in the history
  • Loading branch information
csilvers committed Mar 28, 2020
1 parent 1ecd074 commit 55e0f0d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugin/federation/federation.go
Expand Up @@ -181,7 +181,9 @@ func (e *Entity) allFieldsAreExternal() bool {

func (f *federation) GenerateCode(data *codegen.Data) error {
if len(f.Entities) > 0 {
data.Objects.ByName("Entity").Root = true
if data.Objects.ByName("Entity") != nil {
data.Objects.ByName("Entity").Root = true
}
for _, e := range f.Entities {
obj := data.Objects.ByName(e.Def.Name)
for _, field := range obj.Fields {
Expand Down

0 comments on commit 55e0f0d

Please sign in to comment.