File tree Expand file tree Collapse file tree
packages/kitsu-core/src/deserialise Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,15 +58,15 @@ export function deserialise (response) {
5858 if ( ! response ) return
5959
6060 // Collection of resources
61- if ( response . data && Array . isArray ( response . data ) ) response = deserialiseArray ( response )
61+ if ( Array . isArray ( response . data ) ) response = deserialiseArray ( response )
6262 // Single resource with included relationships
6363 else if ( response . included ) response . data = linkRelationships ( response . data , response . included )
64- else if ( response . data && response . data . constructor === Object ) response . data = linkRelationships ( response . data )
64+ else if ( response . data ? .constructor === Object ) response . data = linkRelationships ( response . data )
6565
6666 delete response . included
6767
6868 // Move attributes to the parent object
69- if ( response . data && response . data . attributes ) response . data = deattribute ( response . data )
69+ if ( response . data ? .attributes ) response . data = deattribute ( response . data )
7070
7171 return response
7272}
You can’t perform that action at this time.
0 commit comments