Skip to content

Commit

Permalink
fix invalid json access
Browse files Browse the repository at this point in the history
  • Loading branch information
burner committed Mar 10, 2021
1 parent 11b884e commit 38cd79e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/graphql/graphql.d
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class GraphQLD(T, QContext = DefaultContext) {
name, parent, args
);
Json ret = Json.emptyObject();
if(parent.type != Json.Type.null_ && name in parent) {
if(parent.type == Json.Type.object && name in parent) {
ret["data"] = Json.emptyObject();
ret["data"] = parent[name];
} else {
Expand Down

0 comments on commit 38cd79e

Please sign in to comment.