Skip to content

Commit

Permalink
Merge pull request #5366 from emberjs/sly7-7-patch-1
Browse files Browse the repository at this point in the history
fix initial polymorphic attribute
  • Loading branch information
runspired authored Apr 3, 2018
2 parents b6433cd + 4281bdf commit 612ef6d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion addon/-private/system/relationships/state/has-many.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export default class ManyRelationship extends Relationship {
super(store, internalModel, inverseKey, relationshipMeta);
this.belongsToType = relationshipMeta.type;
this.canonicalState = [];
this.isPolymorphic = relationshipMeta.options.polymorphic;
// The ManyArray for this relationship
this._manyArray = null;
// The previous ManyArray for this relationship. It will be destroyed when
Expand Down
2 changes: 1 addition & 1 deletion addon/-private/system/relationships/state/relationship.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default class Relationship {
this.inverseKey = inverseKey;
this.internalModel = internalModel;
this.isAsync = typeof async === 'undefined' ? true : async;
this.isPolymorphic = typeof polymorphic === 'undefined' ? true : polymorphic;
this.isPolymorphic = typeof polymorphic === 'undefined' ? false : polymorphic;
this.relationshipMeta = relationshipMeta;
//This probably breaks for polymorphic relationship in complex scenarios, due to
//multiple possible modelNames
Expand Down

0 comments on commit 612ef6d

Please sign in to comment.