Author: johnh
Date: Thu May 19 21:10:21 2011
New Revision: 1125105

URL: http://svn.apache.org/viewvc?rev=1125105&view=rev
Log:
Fix subtle variable scoping issue. It might work anyway due to JS vagaries but 
this logic is cleaner.


Modified:
    shindig/trunk/features/src/main/javascript/features/rpc/rpc.js

Modified: shindig/trunk/features/src/main/javascript/features/rpc/rpc.js
URL: 
http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js?rev=1125105&r1=1125104&r2=1125105&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/rpc/rpc.js (original)
+++ shindig/trunk/features/src/main/javascript/features/rpc/rpc.js Thu May 19 
21:10:21 2011
@@ -685,12 +685,13 @@ if (!window['gadgets']['rpc']) { // make
     }
 
     function setupChildIframe(gadgetId, opt_frameurl, opt_authtoken) {
+      var childIframe = null;
       if (gadgetId.charAt(0) != '/') {
         // only set up child (and not sibling) iframe
         if (!gadgets.util) {
           return;
         }
-        var childIframe = document.getElementById(gadgetId);
+        childIframe = document.getElementById(gadgetId);
         if (!childIframe) {
           throw new Error('Cannot set up gadgets.rpc receiver with ID: ' + 
gadgetId +
               ', element not found.');


Reply via email to