You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug actually related to all truthConvert-helpers.
Initially, I reproduced this bug with an ember-data model (async belongsTo relationship), but it can be reproduced on any Ember.ProxyMixin based object.
What's going on here:
I have an ember-data model in loading state (isPending == true)
{{not model}} returns true (offtopic: isn't that weird already? model != null, so I expect false as result of {{not model}}). OK, it returns true because truthConvert checks isTruthy and model.isTruthy === false until it is fulfilled.
After some time, the model is loaded. model.isTruthy becomes true, model.isSettled === true.
{{not model}} is not recomputed, it still returns true (expected false).
Ember: 3.4.8
Ember Data: 3.4.4
ember-truth-helpers: 2.1.0
This bug actually related to all truthConvert-helpers.
Initially, I reproduced this bug with an ember-data model (async belongsTo relationship), but it can be reproduced on any Ember.ProxyMixin based object.
What's going on here:
isPending == true
){{not model}}
returnstrue
(offtopic: isn't that weird already? model != null, so I expect false as result of{{not model}}
). OK, it returnstrue
becausetruthConvert
checksisTruthy
andmodel.isTruthy === false
until it is fulfilled.model.isTruthy
becomestrue
,model.isSettled === true
.{{not model}}
is not recomputed, it still returnstrue
(expectedfalse
).Ember: 3.4.8
Ember Data: 3.4.4
ember-truth-helpers: 2.1.0
Demo: https://ember-twiddle.com/1dd51cbbc7e12f94e255913ef279baec?openFiles=controllers.application.js%2C
The text was updated successfully, but these errors were encountered: