Skip to content

calculateTree() runs forever if PR has 1000+ files #138

Open
@regosen

Description

@regosen

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)
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions