Skip to content

Commit

Permalink
Merge pull request #3569 from fivetanley/squash-release-deprecation-w…
Browse files Browse the repository at this point in the history
…arnings

[BUGFIX release] squash normalizePayload deprecations
  • Loading branch information
fivetanley committed Jul 21, 2015
2 parents 88d0456 + 51448a3 commit 19bfaa3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/ember-data/lib/serializers/json-serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,10 @@ var JSONSerializer = Serializer.extend({
@return {Object} json The deserialized payload
*/
extractSingle: function(store, typeClass, payload, id, requestType) {
Ember.deprecate('`serializer.normalizePayload` has been deprecated. Please use `serializer.normalizeResponse` with the new Serializer API to modify the payload.', this.normalizePayload === JSONSerializer.prototype.normalizePayload);
if (!this.get('didDeprecateNormalizePayload')) {
this.set('didDeprecateNormalizePayload', true);
Ember.deprecate('`serializer.normalizePayload` has been deprecated. Please use `serializer.normalizeResponse` with the new Serializer API to modify the payload.', this.normalizePayload === JSONSerializer.prototype.normalizePayload);
}
var normalizedPayload = this.normalizePayload(payload);
return this.normalize(typeClass, normalizedPayload);
},
Expand Down Expand Up @@ -1500,7 +1503,10 @@ var JSONSerializer = Serializer.extend({
@return {Array} array An array of deserialized objects
*/
extractArray: function(store, typeClass, arrayPayload, id, requestType) {
Ember.deprecate('`serializer.normalizePayload` has been deprecated. Please use `serializer.normalizeResponse` with the new Serializer API to modify the payload.', this.normalizePayload === JSONSerializer.prototype.normalizePayload);
if (!this.get('didDeprecateNormalizePayload')) {
this.set('didDeprecateNormalizePayload', true);
Ember.deprecate('`serializer.normalizePayload` has been deprecated. Please use `serializer.normalizeResponse` with the new Serializer API to modify the payload.', this.normalizePayload === JSONSerializer.prototype.normalizePayload);
}
var normalizedPayload = this.normalizePayload(arrayPayload);
var serializer = this;

Expand Down

0 comments on commit 19bfaa3

Please sign in to comment.