calculateTree() runs forever if PR has 1000+ files
In index.tsx calculateTree() you parseInt the contents of files_tab_counter, but GitHub formats it with a comma (e.g. 1024 -> "1,024"), so parseInt returns the value before the first comma.
As a result, count is always greater than fileCount and we retrigger calculateTree over and over again:
if (fileCount !== count) {
setTimeout(this.calculateTree.bind(this), 100)
}
Hi @regosen - thanks for reporting. Can you provide a public link to such a PR?
Hi @berzniz - I haven't been able to find such a public PR yet unfortunately... only private ones.
That being said, here's a commit with over 1000 additions/deletions, showing how GitHub formats such numbers:
https://github.com/kubernetes/kubernetes/commit/4bf2ef646f5937c2d6eb49093fad15cfe65e7aae
Thanks @regosen
Oh, do you need a PR that touches a thousand files? https://github.com/MovingBlocks/Terasology/pull/4622/files