Fix a potential reference error in bottombarweb (#1600)
This commit is contained in:
@@ -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'
|
||||||
|
|||||||
Reference in New Issue
Block a user