-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUGFIX release] unloadRecord + findRecord + orphaned relationships #5102
[BUGFIX release] unloadRecord + findRecord + orphaned relationships #5102
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
if (this.isDestroyed || this.isDestroying) { return; } | ||
|
||
// just in-case we are not one of the orphaned, we should still | ||
// still destroy outselves |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: outselves -> ourselves
addon/-private/system/store.js
Outdated
@@ -1128,14 +1128,13 @@ Store = Service.extend({ | |||
let internalModel = this._internalModelsFor(modelName).get(trueId); | |||
|
|||
if (!internalModel) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we can refactor this to avoid if (!
with an else clause (and instead flipping the blocks around to remove the !
). Definitely fine for a follow up PR though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nah i can doit as part of this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thank you. It is much easier for me to read this way.
ce34582
to
b9f79ab
Compare
Given unloadRecord followed by a synchronous findRecord, we should be sure any orphaned relationships are discarded.
b9f79ab
to
27c58e5
Compare
released as v2.14.9 |
Given unloadRecord followed by a synchronous findRecord, we should be sure
any orphaned relationships are discarded.