shindig-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakub Białek (Created) (JIRA) <j...@apache.org>
Subject [jira] [Created] (SHINDIG-1685) Undefined instead of false
Date Tue, 24 Jan 2012 07:05:40 GMT
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, 3.0.0
            Reporter: Jakub Białek


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:
{code}
var rawData = response.result || response.data;
{code}
so if response.result is false then rawData = response.data which is undefined.
To work correctly above line should be change to:
{code}
 var rawData = response.result;
 if (typeof (response.result) == 'undefined') {
    rawData = response.data;
 }
{code}

--
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

       

Mime
View raw message