Skip to content

Commit

Permalink
Removes deprecation from upcoming Ember 2.12 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wesley Workman committed Jan 26, 2017
1 parent cb8e5a6 commit a39aabe
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions addon/ext.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Store.reopen({
*/
createFragment: function(modelName, props) {
Ember.assert("The '" + modelName + "' model must be a subclass of MF.Fragment", this.isFragment(modelName));

var type = this.modelFor(modelName);
var internalModel = new InternalModel(type, null, this, getOwner(this).container);

Expand Down Expand Up @@ -296,7 +296,13 @@ function getFragmentTransform(owner, store, attributeType) {
var polymorphicTypeProp = match[3];

if (!owner.hasRegistration(containerKey)) {
var transformClass = owner._lookupFactory('transform:' + transformName);
var transformClass;
if (owner.factoryFor) {
transformClass = owner.factoryFor('transform:' + transformName);
transformClass = transformClass && transformClass.class;
} else {
transformClass = owner._lookupFactory('transform:' + transformName);
}

owner.register(containerKey, transformClass.extend({
store: store,
Expand Down

0 comments on commit a39aabe

Please sign in to comment.