From e8cefe181a73b3f98ea27d7aca6e5c1db7d2b33d Mon Sep 17 00:00:00 2001 From: Aman Agrawal Date: Wed, 8 Mar 2023 18:13:40 +0000 Subject: [PATCH] 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. --- web/src/portico/team.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/src/portico/team.js b/web/src/portico/team.js index c2a0692395..b57527c4a1 100644 --- a/web/src/portico/team.js +++ b/web/src/portico/team.js @@ -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,