You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "Dan Dumont (Resolved) (JIRA)" <ji...@apache.org> on 2012/04/13 21:38:17 UTC

[jira] [Resolved] (SHINDIG-1685) Undefined instead of false

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

Dan Dumont resolved SHINDIG-1685.
---------------------------------

    Resolution: Fixed

Committed r1325916
                
> Undefined instead of false
> --------------------------
>
>                 Key: SHINDIG-1685
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1685
>             Project: Shindig
>          Issue Type: Bug
>          Components: Javascript 
>    Affects Versions: 2.0.2, 2.5.0-beta1
>            Reporter: Jakub BiaƂek
>            Assignee: Dan Dumont
>
> If handler response is of type 'Future<Boolean>' the false response will be parsed by JS to 'undefined'. It works in such way because in jsonrpccontainer.js in JsonRpcContainer.prototype.requestData function the sendResponse var contains this line:
>    var rawData = response.result || response.data;
> so if response.result is false then rawData = response.data which is undefined.
> To work correctly above line should be changed to:
>    var rawData = response.result;
>    if (typeof (response.result) == 'undefined') {
>       rawData = response.data;
>    }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira