mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
b2db7f21ed
Promises are kind of special, and do not behave like usual javascript values. For this issue, the problem is that when the observer tries to observe a promise value, the code will crash with an error like this: Uncaught TypeError: Method Promise.prototype.then called on incompatible receiver [object Object] Also, note that it does not make much sense to proxify promise methods anyway, since they are not (supposed) to be modified. So, with this commit, we simply consider that promises should be treated like a primitive value: simply ignored when determining if it should be proxified Note that I actually believe that putting promises in a useState is not a good idea in general. closes #677