shindig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ssiev...@apache.org
Subject svn commit: r1347826 - /shindig/trunk/features/src/main/javascript/features/container/init.js
Date Thu, 07 Jun 2012 23:05:26 GMT
Author: ssievers
Date: Thu Jun  7 23:05:26 2012
New Revision: 1347826

URL: http://svn.apache.org/viewvc?rev=1347826&view=rev
Log:
SHINDIG-1794 | In init.js the loop that looks for script tags is broken

Modified:
    shindig/trunk/features/src/main/javascript/features/container/init.js

Modified: shindig/trunk/features/src/main/javascript/features/container/init.js
URL: http://svn.apache.org/viewvc/shindig/trunk/features/src/main/javascript/features/container/init.js?rev=1347826&r1=1347825&r2=1347826&view=diff
==============================================================================
--- shindig/trunk/features/src/main/javascript/features/container/init.js (original)
+++ shindig/trunk/features/src/main/javascript/features/container/init.js Thu Jun  7 23:05:26
2012
@@ -31,9 +31,10 @@
       scriptEl = document.getElementById(window.__CONTAINER_SCRIPT_ID);
     } else {
       var scriptEls = document.getElementsByTagName('script');
-      for(var i = 0; !scriptEls && i < scriptEls.length; i++) {
+      for(var i = 0; scriptEls && i < scriptEls.length; i++) {
         if(/.*gadgets\/js\/.*container.*[.]js.*[?&]c=1(&|$).*/.test(scriptEls[i].src))
{
           scriptEl = scriptEls[i];
+          break;
         }
       }
     }



Mime
View raw message