Added a null guard for args field
This commit is contained in:
parent
6c4fbb501c
commit
edbb81d089
1 changed files with 1 additions and 1 deletions
|
|
@ -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})` : '';
|
||||
|
|
|
|||
Loading…
Reference in a new issue