Skip to content

Commit 63fad25

Browse files
pdrvskybirkir
authored andcommitted
fix: add an empty array fallback for fields with multiple documents type (#300)
1 parent d5ebdb6 commit 63fad25

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/prime-field-document/src/PrimeFieldDocument.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export class PrimeFieldDocument extends PrimeField {
7676
locale: { type: GraphQLString },
7777
},
7878
resolve: async (root, args, ctx, info) => {
79-
const values = root[this.schemaField.name];
79+
const values = root[this.schemaField.name] || [];
8080
return Promise.all(
8181
values.map(value => {
8282
const [schemaId, documentId] = value.split(',');

0 commit comments

Comments
 (0)