flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik de Bruin (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (FLEX-34753) Returning strongly typed object in Promise fails
Date Sat, 04 Apr 2015 11:25:33 GMT

     [ https://issues.apache.org/jira/browse/FLEX-34753?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Erik de Bruin resolved FLEX-34753.
----------------------------------
       Resolution: Fixed
    Fix Version/s: Apache Flex 4.15.0

> Returning strongly typed object in Promise fails
> ------------------------------------------------
>
>                 Key: FLEX-34753
>                 URL: https://issues.apache.org/jira/browse/FLEX-34753
>             Project: Apache Flex
>          Issue Type: Bug
>    Affects Versions: Apache Flex 4.14.0
>            Reporter: Aleksey
>            Assignee: Erik de Bruin
>              Labels: easyfix
>             Fix For: Apache Flex 4.15.0
>
>         Attachments: promises.patch
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message