Error 500 accessing branches page

https://sentry.gitlap.com/gitlab/gitlabcom/issues/88942/

ActionController::UrlGenerationError: No route matches {:action=>"show", :controller=>"projects/tree", :id=>"", :namespace_id=>#<Group id:1717316 @redacted-namespace>, :project_id=>#<Project id:3756252 redacted-namespace/redacted-project>} missing required keys: [:id]
  app/helpers/gitlab_routing_helper.rb:13:in `project_tree_path'
    namespace_project_tree_path(project.namespace, project, ref || @ref || project.repository.root_ref, *args) # rubocop:disable Cop/ProjectPathHelper
  app/views/projects/branches/_branch.html.haml:9:in `_app_views_projects_branches__branch_html_haml___3436905156245864927_69823345439180'
    = link_to project_tree_path(@project, branch.name), class: 'item-title str-truncated ref-name' do
  app/views/projects/branches/index.html.haml:44:in `block in _app_views_projects_branches_index_html_haml__709791024838154328_69823347208660'
    = render "projects/branches/branch", branch: branch
  app/views/projects/branches/index.html.haml:43:in `each'
    - @branches.each do |branch|
  app/views/projects/branches/index.html.haml:43:in `_app_views_projects_branches_index_html_haml__709791024838154328_69823347208660'
    - @branches.each do |branch|
...
(174 additional frame(s) were not displayed)

ActionView::Template::Error: No route matches {:action=>"show", :controller=>"projects/tree", :id=>"", :namespace_id=>#<Group id:1717316 @redacted-namespace>, :project_id=>#<Project id:3756252 redacted-namespace/redacted-project>} missing required keys: [:id]

ActionView::Template::Error: No route matches {:action=>"show", :controller=>"projects/tree", :id=>"", :namespace_id=>#<Group id:1717316 @redacted-namespace>, :project_id=>#<Project id:3756252 redacted-namespace/redacted-project>} missing required keys: [:id]
Edited by Stan Hu