asmer@hetzner 4 роки тому
батько
коміт
55daabf362
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      src/front-models.js

+ 1 - 1
src/front-models.js

@@ -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] || []
                         },