From edbb81d089b63a0ca529f7e5dc99000c1f788edd Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Mon, 18 Nov 2019 15:14:26 -0500 Subject: [PATCH] Added a null guard for args field --- components/graphql/field.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/graphql/field.vue b/components/graphql/field.vue index 03855565c..144b1dcd5 100644 --- a/components/graphql/field.vue +++ b/components/graphql/field.vue @@ -35,7 +35,7 @@ export default { computed: { fieldString() { - const args = this.gqlField.args.reduce((acc, arg, index) => { + const args = (this.gqlField.args || []).reduce((acc, arg, index) => { return acc + `${arg.name}: ${arg.type.toString()}${(index !== this.gqlField.args.length - 1) ? ", " : ''}`; }, ''); const argsString = (args.length > 0) ? `(${args})` : '';