Skip to content

Commit e411fc8

Browse files
committed
Fixes issues surrounding force reloading on different query options
* Before there was an issue where if the result turned an empty set then a subsequent query would fail to reload. The previous fix into master had 2 typos, this commit fixes those two typos.
1 parent 3ca3dd1 commit e411fc8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

addon/mixins/model.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export default Ember.Mixin.create({
6262
this.set(_queryIdPropertyName, currentQueryId);
6363

6464
//get the relationship value, reloading if necessary
65-
var value = this.reloadRelationship(propertyName, JSON.stringify(params) === JSON.stringify(oldParams));
65+
var value = this.reloadRelationship(propertyName, JSON.stringify(params) !== JSON.stringify(oldParams));
6666

6767
//return the promise, clearing the ajax options property
6868
return value.catch(function (error) {
@@ -97,7 +97,7 @@ export default Ember.Mixin.create({
9797
//run.next, so that aborted promise gets rejected before starting another
9898
Ember.run.next(this, function () {
9999
var isLoaded = reference.value() !== null;
100-
if (isLoaded || force) {
100+
if (isLoaded || forceReload) {
101101
resolve(reference.reload());
102102
} else {
103103
//isLoaded is false when the last query resulted in an error, so if this load

0 commit comments

Comments
 (0)