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