Skip to content

Commit

Permalink
Merge pull request #3292 from emberjs/store-push-object
Browse files Browse the repository at this point in the history
Allow for store.push(object)
  • Loading branch information
igorT committed Jun 10, 2015
2 parents 144ae4f + 7cab3e3 commit a356c82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ember-data/lib/system/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -1666,7 +1666,7 @@ Store = Service.extend({
updated.
*/
push: function(modelName, data) {
Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string');
Ember.assert('Passing classes to store methods has been removed. Please pass a dasherized string instead of '+ Ember.inspect(modelName), typeof modelName === 'string' || typeof data === 'undefined');
var internalModel = this._pushInternalModel(modelName, data);
if (Ember.isArray(internalModel)) {
return map(internalModel, (item) => {
Expand Down

0 comments on commit a356c82

Please sign in to comment.