From c69138bd071c200d9f49f89e2d51c3da3a9e467b Mon Sep 17 00:00:00 2001 From: horville Date: Fri, 31 Mar 2023 17:17:58 +0200 Subject: [PATCH] Fix fili bac --- components/fili-info.riot | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/fili-info.riot b/components/fili-info.riot index d918c23..8fe6952 100644 --- a/components/fili-info.riot +++ b/components/fili-info.riot @@ -66,7 +66,10 @@ let pctBG = Math.round(list.reduce((s, e) => s + (e.fields.part_acces_gen || 0), 0) / list.filter((e) => e.fields.part_acces_gen).length) let pctBT = Math.round(list.reduce((s, e) => s + (e.fields.part_acces_tec || 0), 0) / list.filter((e) => e.fields.part_acces_tec).length) let pctBP = Math.round(list.reduce((s, e) => s + (e.fields.part_acces_pro || 0), 0) / list.filter((e) => e.fields.part_acces_pro).length) - + if (!pctBG) pctBG = 0; + if (!pctBT) pctBT = 0; + if (!pctBP) pctBP = 0; + this.state.bacStats = [ { name: "Général",