From 2729cfa89ba006d344020c274865ae5828340ac0 Mon Sep 17 00:00:00 2001 From: alguilhot Date: Fri, 21 Oct 2022 18:48:11 +0200 Subject: [PATCH] FIX: Changement constructeur de User Afin d'ajouter tabConv correctement --- bob_party/src/core/user.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bob_party/src/core/user.ts b/bob_party/src/core/user.ts index f2ce858..b804b8f 100644 --- a/bob_party/src/core/user.ts +++ b/bob_party/src/core/user.ts @@ -30,9 +30,12 @@ export class User{ this.TotalCoins=totalCoins; this.CurrentSkin=currentSkin; this.TabSkin=[...tabSkin]; - tabConv?.forEach(conv => { - this.TabConv?.push(conv); - }); + if(tabConv!==undefined){ + this.TabConv=[...tabConv]; + } + else{ + this.TabConv=tabConv; + } } /* Brief : Function getting the name of an user */