From 485591aea25fdb7c257eb1ff3d24423fceb4409c Mon Sep 17 00:00:00 2001 From: humarkx Date: Wed, 31 Aug 2022 11:32:50 +0100 Subject: [PATCH] feat: when opening a direct link tx whithout previously loading the dashboard would break ui --- src/@core/layouts/utils.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/@core/layouts/utils.js b/src/@core/layouts/utils.js index ec94e98b..10728fda 100644 --- a/src/@core/layouts/utils.js +++ b/src/@core/layouts/utils.js @@ -57,11 +57,12 @@ export const isNavLinkActive = link => { chainCompare = router.currentRoute.params.chain === link.route.params.chain } + if (chainCompare) { + localStorage.setItem('selected_chain', link.route.params.chain) + } + return matchedRoutes.some(route => { const actived = (route.name === resolveRoutedName && chainCompare) || route.meta.navActiveLink === resolveRoutedName - if (actived) { - localStorage.setItem('selected_chain', link.route.params.chain) - } return actived }) }