Skip to content

Commit

Permalink
JSON decode fails if buf empty
Browse files Browse the repository at this point in the history
  • Loading branch information
oanatmaria committed Nov 6, 2023
1 parent abb3f1f commit 6db6e25
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions builtins/edge/ds/relation.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,9 @@ func RegisterRelations(logger *zerolog.Logger, fnName string, dr resolvers.Direc
Results: convert.RelationArrayToV2(resp.Results),
}
}

if err := ProtoToBuf(buf, result); err != nil {
return nil, err
}
}
if err := ProtoToBuf(buf, result); err != nil {
return nil, err
}

v, err := ast.ValueFromReader(buf)
Expand Down

0 comments on commit 6db6e25

Please sign in to comment.