Benjol / SE-AutoReviewComments

AutoReviewComments - Pro-forma comments for SE
http://stackapps.com/q/2116
98 stars 39 forks source link

Fix for endless recursive errors #166

Closed CertainPerformance closed 5 years ago

CertainPerformance commented 5 years ago

The initial call to _internalInjector needs the second parameter, retryCount, to start at 0, not undefined, otherwise, if the process doesn't succeed, the recursive call of (triggerElement, retryCount + 1); will result in undefined + 1 or NaN for retryCount and an endless recursive loop, because the if (20 <= retryCount) return; condition never passes.

Benjol commented 5 years ago

Thanks for this. I'm accepting the fix, but ignoring the pull request, because the change needs to be made in src\autoreviewcomments.user.js, not dist\autoreviewcomments.user.js

It's a bit confusing, but see: https://github.com/Benjol/SE-AutoReviewComments/wiki/Building