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 aae9010 commit 0543d45
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 @@ -122,10 +122,9 @@ func RegisterRelation(logger *zerolog.Logger, fnName string, dr resolvers.Direct
Objects: convert.ObjectMapToV2(resp.Objects),
}
}

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 0543d45

Please sign in to comment.