Fix a potential reference error in bottombarweb (#1600)
parent
6598fca79d
commit
847d4d19b5
|
@ -109,7 +109,12 @@ const NavItem: React.FC<{
|
||||||
href: string
|
href: string
|
||||||
routeName: string
|
routeName: string
|
||||||
}> = ({children, href, routeName}) => {
|
}> = ({children, href, routeName}) => {
|
||||||
const currentRoute = useNavigationState(getCurrentRoute)
|
const currentRoute = useNavigationState(state => {
|
||||||
|
if (!state) {
|
||||||
|
return {name: 'Home'}
|
||||||
|
}
|
||||||
|
return getCurrentRoute(state)
|
||||||
|
})
|
||||||
const store = useStores()
|
const store = useStores()
|
||||||
const isActive =
|
const isActive =
|
||||||
currentRoute.name === 'Profile'
|
currentRoute.name === 'Profile'
|
||||||
|
|
Loading…
Reference in New Issue