From 7cab3e3c45d38f5df923b4a70fe603c2ed5010a5 Mon Sep 17 00:00:00 2001 From: Christoffer Persson <christoffer@valdoo.se> Date: Wed, 10 Jun 2015 21:31:21 +0200 Subject: [PATCH] Allow for store.push(object) --- packages/ember-data/lib/system/store.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ember-data/lib/system/store.js b/packages/ember-data/lib/system/store.js index 4fef2f0f077..41460c9748a 100644 --- a/packages/ember-data/lib/system/store.js +++ b/packages/ember-data/lib/system/store.js @@ -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) => {