diff --git a/packages/ember-data/lib/system/store.js b/packages/ember-data/lib/system/store.js index b2b36d736ec..5240b6af977 100644 --- a/packages/ember-data/lib/system/store.js +++ b/packages/ember-data/lib/system/store.js @@ -25,6 +25,31 @@ import { Model } from "ember-data/system/model"; //Stanley told me to do this var Backburner = Ember.__loader.require('backburner')['default'] || Ember.__loader.require('backburner')['Backburner']; +//Shim Backburner.join +if (!Backburner.prototype.join) { + var slice = [].slice; + var isString = function(suspect) { + return typeof suspect === 'string'; + }; + + Backburner.prototype.join = function(target, method /*, args */) { + if (this.currentInstance) { + if (!method) { + method = target; + target = null; + } + + if (isString(method)) { + method = target[method]; + } + + return method.apply(target, slice.call(arguments, 2)); + } else { + return this.run.apply(this, arguments); + } + }; +} + var get = Ember.get; var set = Ember.set;