Repository compare branches feature not showing available branches to select (Compare Git Revisions)
<!---
Please read this!
Before opening a new issue, make sure to search for keywords in the issues
filtered by the "regression" or "bug" label:
- https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=regression
- https://gitlab.com/gitlab-org/gitlab/issues?label_name%5B%5D=bug
and verify the issue you're about to submit isn't a duplicate.
--->
### Summary
<!-- Summarize the bug encountered concisely. -->
A customer reported that when a user goes to *Repository* > *Compare* on a *Project* the user is unable to select target branches to compare. I tried with a couple of personal repositories and replicated the issue.
### Steps to reproduce
* Open a project
* Create a branch (not necessary but to illustrate what you should see on *Compare*)
* Go to *Repository* > *Compare*
<!-- Describe how one can reproduce the issue - this is very important. Please use an ordered list. -->
### Example Project
<!-- If possible, please create an example project here on GitLab.com that exhibits the problematic
behavior, and link to it here in the bug report. If you are using an older version of GitLab, this
will also determine whether the bug is fixed in a more recent version. -->
https://gitlab.com/gitlab-gold/mmora-gold-subgroup/pages-gatsby-jekyll/-/compare?from=master&to=testbranch-001
### What is the current *bug* behavior?
Selection field keep looping not showing any branches
<!-- Describe what actually happens. -->
### What is the expected *correct* behavior?
Ability to select and compare between branches
<!-- Describe what you should see instead. -->
### Relevant logs and/or screenshots
 This is a screenshot of my web console when refreshing the page
<!-- Paste any relevant logs - please use code blocks (```) to format console output, logs, and code
as it's tough to read otherwise. -->
### Output of checks
<!-- If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com -->
This bug happens on GitLab.com
issue