From 7253916af4e2775341ead4f980502aac2415eea7 Mon Sep 17 00:00:00 2001 From: swarnadipa-dev Date: Mon, 7 Aug 2023 16:32:13 +0530 Subject: [PATCH] ftest resolved --- elements/nuxeo-app.js | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/elements/nuxeo-app.js b/elements/nuxeo-app.js index 0640bfbcc8..5280c3aebf 100644 --- a/elements/nuxeo-app.js +++ b/elements/nuxeo-app.js @@ -992,15 +992,21 @@ Polymer({ }, _toggleDrawer(e, selectedObj) { - const selectedItem = e.type === 'keyup' ? selectedObj || 0 : e || 0; - this._selected = selectedItem; - if (selectedItem && selectedItem.detail && selectedItem.detail.selected) { - if (this._selected === selectedItem.detail.selected && this.drawerOpened) { - this._closeDrawer(); - } else { - this._selected = this.selectedTab = selectedItem.detail.selected; - this._openDrawer(); - } + const selectedItem = e.type === 'keyup' ? selectedObj : e; + if ( + selectedItem && + selectedItem.detail && + selectedItem.detail.selected && + this._selected === selectedItem.detail.selected && + this.drawerOpened + ) { + this._closeDrawer(); + } else { + this._selected = this.selectedTab = + selectedItem && selectedItem.detail && selectedItem.detail.selected + ? selectedItem.detail.selected + : selectedItem; + this._openDrawer(); } },