From e24163efa1e2d06f795cfb652308c80519fb487f Mon Sep 17 00:00:00 2001 From: The17thDoctor Date: Thu, 30 Mar 2023 16:00:54 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20appels=20r=C3=A9cursifs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/school.riot | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/components/school.riot b/components/school.riot index cedbb93..c883ea5 100644 --- a/components/school.riot +++ b/components/school.riot @@ -21,7 +21,7 @@ - + {etablissement.fields.g_ea_lib_vx} {etablissement.fields.ville_etab} {etablissement.fields.dep} @@ -43,12 +43,13 @@ return { onBeforeMount(props, state) { state = { - items: null + items: null, + breakCycle: false } }, onUpdated(props, state) { - if (!props.shouldShowInfos) return + if (!props.shouldShowInfos || state.breakCycle) return fetchEtablissement(props.course).then((response) => { response.forEach(etablissement => { // calcul la moyenne @@ -63,9 +64,11 @@ etablissement.fields.moyenne = ((pct_TBF*19)+(pct_TB*17)+(pct_B*15)+(pct_AB*13)+(pct_sansmention*11))/100 }) + state.breakCycle = true this.update({ items: response }) + state.breakCycle = false }) } }