Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
fix(entity): do not skip empty arrays
Browse files Browse the repository at this point in the history
BREAKING CHANGE: toObject and toJSON will now return empty arrays instead of skipping completely
  • Loading branch information
RWOverdijk committed Feb 7, 2017
1 parent a813afc commit fad77ec
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,10 +640,7 @@ function asObject(entity, shallow) {
}
});

// We don't send along empty arrays.
if (asObjects.length > 0) {
pojo[propertyName] = asObjects;
}
pojo[propertyName] = asObjects;
});

return pojo;
Expand Down

0 comments on commit fad77ec

Please sign in to comment.