Fixed an onload recursion issue if load_component() is called during global onload
authorDan
Fri, 28 Nov 2008 22:52:29 -0500
changeset 752 8875559bae0e
parent 751 c1242466d061
child 753 33ae51d7c685
Fixed an onload recursion issue if load_component() is called during global onload
includes/clientside/static/enano-lib-basic.js
--- a/includes/clientside/static/enano-lib-basic.js	Fri Nov 28 22:11:51 2008 -0500
+++ b/includes/clientside/static/enano-lib-basic.js	Fri Nov 28 22:52:29 2008 -0500
@@ -250,10 +250,12 @@
     // async request, so if status != 200 at this point then we're screwed
     if ( ajax.readyState == 4 && ajax.status == 200 )
     {
-      onload_hooks = new Array();
+      if ( onload_complete )
+        onload_hooks = new Array();
       eval_global(ajax.responseText);
       load_hide_win();
-      runOnloadHooks();
+      if ( onload_complete )
+        runOnloadHooks();
     }
   }
   catch(e)