team: Don't throw error for team page in dev environment.

In dev setup, contributors list is empty so loading the page
throws an error, this is intended to fix that.
This commit is contained in:
Aman Agrawal 2023-03-08 18:13:40 +00:00 committed by Tim Abbott
parent c41fa0dfd0
commit e8cefe181a
1 changed files with 3 additions and 1 deletions

View File

@ -67,7 +67,9 @@ export default function render_tabs() {
const template = _.template($("#contributors-template").html());
const count_template = _.template($("#count-template").html());
const total_count_template = _.template($("#total-count-template").html());
const contributors_list = page_params.contributors.filter((c) => exclude_bot_contributors(c));
const contributors_list = page_params.contributors
? page_params.contributors.filter((c) => exclude_bot_contributors(c))
: [];
const mapped_contributors_list = contributors_list.map((c) => ({
name: get_display_name(c),
github_username: c.github_username,