Skip to content

Commit e014241

Browse files
authored
Update index.js
1 parent 3549030 commit e014241

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function jsonapify(data, model, selfUrl, context) {
172172
const idAttribute = Object.keys(model.attributes).filter(byPrimaryKey(model))[0];
173173
const excluded = [idAttribute];
174174

175-
if (context.include && context.include.length) {
175+
if (context && context.include && context.include.length) {
176176
context.include.forEach(parseRelationships(data, includedData, model, selfUrl));
177177
}
178178

0 commit comments

Comments
 (0)