From 4a92e7f0ec8d758ab9ba629cf6bb3573621e5659 Mon Sep 17 00:00:00 2001
From: Alex ORLUC <alex.orluc@maarch.org>
Date: Fri, 8 Nov 2019 14:39:01 +0100
Subject: [PATCH] FEAT #12091 TIME 0 fix current res

---
 src/frontend/app/list/basket-list.component.ts | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/frontend/app/list/basket-list.component.ts b/src/frontend/app/list/basket-list.component.ts
index 7b520adcd56..4e2beb66e38 100755
--- a/src/frontend/app/list/basket-list.component.ts
+++ b/src/frontend/app/list/basket-list.component.ts
@@ -239,11 +239,13 @@ export class BasketListComponent implements OnInit {
     togglePanel(mode: string, row: any) {
         let thisSelect = { checked : true };
         let thisDeselect = { checked : false };
+        const previousRes = this.currentResource;
         row.checked = true;
+
         this.toggleAllRes(thisDeselect);
         this.toggleRes(thisSelect, row);
-
-        if(this.currentResource.resId == row.resId && this.sidenavRight.opened && this.currentMode == mode) {
+        
+        if(previousRes.resId == row.resId && this.sidenavRight.opened && this.currentMode == mode) {
             this.sidenavRight.close();
         } else {
             this.currentMode = mode;
-- 
GitLab