Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
chore: fix recursion error
Browse files Browse the repository at this point in the history
- This fixes an error in Firefox for Linux where too much recursion happens

Closes #5061
Fixes #4977
  • Loading branch information
wesleycho committed Dec 14, 2015
1 parent 6dbd3f8 commit 812d47e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions misc/demo/assets/rainbow.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 812d47e

Please sign in to comment.