chore: fix recursion error

- This fixes an error in Firefox for Linux where too much recursion happens

Closes #5061
Fixes #4977
This commit is contained in:
Wesley Cho
2015-12-12 23:42:12 -08:00
parent 6dbd3f8f06
commit 812d47e817
+2 -2
View File
@@ -311,9 +311,9 @@ window['Rainbow'] = (function() {
_processPattern(regex, pattern, code, callback);
};
// every 100 items we process let's call set timeout
// every 50 items we process let's call set timeout
// to let the ui breathe a little
return match_counter % 100 > 0 ? nextCall() : setTimeout(nextCall, 0);
return match_counter % 50 > 0 ? nextCall() : setTimeout(nextCall, 0);
};
// if this is not a child match and it falls inside of another