Skip to content

Commit b512f51

Browse files
jsedlacekbmac
authored andcommitted
setCanonicalRecord should check for this.canonicalState, not this.inverseRecord
when calling setCanonicalRecord with null it should check for presence of canonicalState instead of inverseRecord. (cherry picked from commit 8400b9d)
1 parent 169d5e0 commit b512f51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

addon/-private/system/relationships/state/belongs-to.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ BelongsToRelationship.prototype.setRecord = function(newRecord) {
3333
BelongsToRelationship.prototype.setCanonicalRecord = function(newRecord) {
3434
if (newRecord) {
3535
this.addCanonicalRecord(newRecord);
36-
} else if (this.inverseRecord) {
37-
this.removeCanonicalRecord(this.inverseRecord);
36+
} else if (this.canonicalState) {
37+
this.removeCanonicalRecord(this.canonicalState);
3838
}
3939
this.setHasData(true);
4040
this.setHasLoaded(true);

0 commit comments

Comments
 (0)