Closed twillw closed 5 years ago
The getModel(id: string) method calls _parseEntries(json.items, links, multiLocale) however when fetching a single model contentful doesn't return an items key in the json. Ex:
getModel(id: string)
_parseEntries(json.items, links, multiLocale)
items
{ "sys": { "space": { "sys": { "type": "Link", "linkType": "Space", "id": "07ji7vj2yk96" } }, "type": "Entry", "id": "1oZUuIStCIK4hbho8VRvvk", "contentType": { "sys": { "type": "Link", "linkType": "ContentType", "id": "article" } }, "revision": 0, "createdAt": "2019-07-03T17:12:37.261Z", "updatedAt": "2019-07-04T21:31:18.135Z", "environment": { "sys": { "id": "master", "type": "Link", "linkType": "Environment" } }, "locale": "en-US" }, "fields": { "imagethumb": { "sys": { "type": "Link", "linkType": "Asset", "id": "4wZGcaQygMLFwji3F0v44t" } }, "title": "Harnessing tech to tackle homelessness: Meet CG Chen! ", "body": "[Ample Labs](https://amplelabs.com \"Ample Labs\") is a non-profit empowering those of us who are experiencing homelessness through technology... " } }
The getModel method just ends up returning an empty array for this response.
getModel
Solved in version 1.4.2. Thanks!
The
getModel(id: string)
method calls_parseEntries(json.items, links, multiLocale)
however when fetching a single model contentful doesn't return anitems
key in the json. Ex:The
getModel
method just ends up returning an empty array for this response.