Skip to content

Commit 3cd8a35

Browse files
committed
fix handling undefined in arguments
1 parent c1ebc70 commit 3cd8a35

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/parseGql.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ function parse(ast, preDefs = {}) {
3434
function parseArguments(args) {
3535
const result = {};
3636
for (const arg of args) {
37-
result[arg.name.value] = arg.value.value
38-
? arg.value.value
39-
: parseArguments(arg.value.fields);
37+
result[arg.name.value] = arg.value.fields
38+
? parseArguments(arg.value.fields)
39+
: arg.value.value;
4040
}
4141
return result;
4242
}

0 commit comments

Comments
 (0)