|
@@ -144,7 +144,7 @@ export default async function createModels2(gql, config={create: 'Upsert', updat
|
|
|
LIST(){
|
|
|
this[name] = []
|
|
|
const otherType = inTypes(ofType.name)
|
|
|
- if (otherType && data[name])
|
|
|
+ if (otherType && data && data[name])
|
|
|
this[name] = data[name].map(otherEntity => new classes[otherType.name](otherEntity, otherEntity._id && Object.keys(otherEntity).length === 1))
|
|
|
else if (data && typeof data === 'object' && name in data) this[name] = data[name] || []
|
|
|
},
|