Author: ddumont
Date: Fri Apr 13 19:34:51 2012
New Revision: 1325916

URL: http://svn.apache.org/viewvc?rev=1325916&view=rev
Log:
SHINDIG-1685: Undefined instead of false

Modified:
    
shindig/trunk/features/src/main/javascript/features/opensocial-jsonrpc/jsonrpccontainer.js

Modified: 
shindig/trunk/features/src/main/javascript/features/opensocial-jsonrpc/jsonrpccontainer.js
URL: 
http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/opensocial-jsonrpc/jsonrpccontainer.js?rev=1325916&r1=1325915&r2=1325916&view=diff
==============================================================================
--- 
shindig/trunk/features/src/main/javascript/features/opensocial-jsonrpc/jsonrpccontainer.js
 (original)
+++ 
shindig/trunk/features/src/main/javascript/features/opensocial-jsonrpc/jsonrpccontainer.js
 Fri Apr 13 19:34:51 2012
@@ -192,7 +192,8 @@ var JsonRpcRequestItem = function(rpc, o
               ') and response id(' + response.id + ') do not match';
         }
 
-        var rawData = response.result || response.data;
+        // A false response may be valid, careful with truthiness here.
+        var rawData = typeof(response.result) != 'undefined' ? response.result 
: response.data;
         var error = response.error;
         var errorMessage = '';
 


Reply via email to