Using short timeout to fix potential race conditions
authorAlexander Ebert <ebert@woltlab.com>
Tue, 19 Nov 2013 17:33:06 +0000 (18:33 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 19 Nov 2013 17:33:06 +0000 (18:33 +0100)
wcfsetup/install/files/js/WCF.js

index 3322cac68e8e36d574690a8d8035e98f57ce4b88..864f6feff76f56e978ce535814f01781ba981b0e 100755 (executable)
@@ -5917,7 +5917,9 @@ WCF.System.Dependency.Manager = {
                
                // already loaded, invoke now
                if (WCF.inArray(identifier, this._loaded)) {
-                       callback();
+                       setTimeout(function() {
+                               callback();
+                       }, 1);
                }
                else {
                        if (!this._callbacks[identifier]) {