Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Apache Flex 4.14.0
-
None
Description
When I try to call fulfill function and pass strongly typed object as argument it always fails.
I think issue is in the _resolve function of Promise class:
if (result && (typeof(result) === 'object' || typeof(result) === 'function') && result.then is Function)
Correct me if I am wrong but "typeof" will return "object" for any strongly typed objects and then next condition tries to access "then" property even though it might not be present.
I guess easyfix would be to add check ("then" in result) before trying to access it.