From e411fc8d40a2d4314cafd514f02bc6b9177c6345 Mon Sep 17 00:00:00 2001 From: arthur5005 Date: Wed, 26 Dec 2018 16:12:36 -0800 Subject: [PATCH] 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. --- addon/mixins/model.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addon/mixins/model.js b/addon/mixins/model.js index d7eb38a..84c44b8 100644 --- a/addon/mixins/model.js +++ b/addon/mixins/model.js @@ -62,7 +62,7 @@ export default Ember.Mixin.create({ this.set(_queryIdPropertyName, currentQueryId); //get the relationship value, reloading if necessary - var value = this.reloadRelationship(propertyName, JSON.stringify(params) === JSON.stringify(oldParams)); + var value = this.reloadRelationship(propertyName, JSON.stringify(params) !== JSON.stringify(oldParams)); //return the promise, clearing the ajax options property return value.catch(function (error) { @@ -97,7 +97,7 @@ export default Ember.Mixin.create({ //run.next, so that aborted promise gets rejected before starting another Ember.run.next(this, function () { var isLoaded = reference.value() !== null; - if (isLoaded || force) { + if (isLoaded || forceReload) { resolve(reference.reload()); } else { //isLoaded is false when the last query resulted in an error, so if this load