Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit d06d931

Browse files
committed
fix(timeouts): fix an obscure cause of firefox timeouts
Fixes #493
1 parent 6ae6261 commit d06d931

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/clientsidescripts.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,12 @@ clientSideScripts.findTextareas = function() {
495495
*/
496496
clientSideScripts.testForAngular = function() {
497497
var attempts = arguments[0];
498-
var callback = arguments[arguments.length - 1];
498+
var asyncCallback = arguments[arguments.length - 1];
499+
var callback = function(args) {
500+
setTimeout(function() {
501+
asyncCallback(args);
502+
}, 0);
503+
};
499504
var check = function(n) {
500505
try {
501506
if (window.angular && window.angular.resumeBootstrap) {

0 commit comments

Comments
 (0)