diff --git a/components/wrapper/index.tsx b/components/wrapper/index.tsx index 67fec6f..d770b44 100644 --- a/components/wrapper/index.tsx +++ b/components/wrapper/index.tsx @@ -78,11 +78,10 @@ const Wrapper: FC = ({ exact: true, }) ) - if (matchMenu) { - setState({ - breadcrumbs: getMenuPaths(matchMenu, state.menus), - }) - } + const breadcrumbs = matchMenu ? getMenuPaths(matchMenu, state.menus) : [] + setState({ + breadcrumbs, + }) } useEffect(() => {