Promises are used very transparently in Ember. Normally you can use a promise just like a model, which is great!
When using comparison however, it gets tricky. When you compare a promise with a model you don’t get a match even if they are equal.
In my case, I have to check if an object is already in an arrays, which sometimes return Promises and sometimes the actual objects. The comparison is done with
.contains(). When I do direct comparison with
===, I can try fetching the
content property to see if I got a promise and have two checks, which is tedious but it works, with arrays it isn’t so simple anymore.
How did you solve this issue?