Skip to content

Commit

Permalink
Merge pull request #4274 from Arkham/update-extract-meta-doc
Browse files Browse the repository at this point in the history
[DOC canary] Update extractMeta documentation
  • Loading branch information
pangratz committed Mar 28, 2016
2 parents 9e9ecac + 11f6b6b commit 516d386
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions addon/serializers/json.js
Original file line number Diff line number Diff line change
Expand Up @@ -1248,9 +1248,10 @@ export default Serializer.extend({
export default DS.JSONSerializer.extend({
extractMeta: function(store, typeClass, payload) {
if (payload && payload._pagination) {
store.setMetadataFor(typeClass, payload._pagination);
if (payload && payload.hasOwnProperty('_pagination')) {
let meta = payload._pagination;
delete payload._pagination;
return meta;
}
}
});
Expand Down

0 comments on commit 516d386

Please sign in to comment.