From c91a4739254ee7692eb9026dd321a7fe1b756fa8 Mon Sep 17 00:00:00 2001 From: Steven Straatemans Date: Fri, 1 Nov 2024 15:52:13 +0100 Subject: [PATCH] fix build --- .../libs/kode-ui/src/patterns/SideBarLayout/SideBarLayout.tsx | 2 +- .../src/patterns/SideBarLayout/components/SideBarAside.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/libs/kode-ui/src/patterns/SideBarLayout/SideBarLayout.tsx b/packages/libs/kode-ui/src/patterns/SideBarLayout/SideBarLayout.tsx index b2778005a1..5ec71a9e0d 100644 --- a/packages/libs/kode-ui/src/patterns/SideBarLayout/SideBarLayout.tsx +++ b/packages/libs/kode-ui/src/patterns/SideBarLayout/SideBarLayout.tsx @@ -44,7 +44,7 @@ export const SideBarLayout: FC = ({ //and then saved in the layout useEffect(() => { setLocation(location); - }, [location.url]); + }, [location?.url, location?.hash]); return ( diff --git a/packages/libs/kode-ui/src/patterns/SideBarLayout/components/SideBarAside.tsx b/packages/libs/kode-ui/src/patterns/SideBarLayout/components/SideBarAside.tsx index 7848379681..5bc8361b56 100644 --- a/packages/libs/kode-ui/src/patterns/SideBarLayout/components/SideBarAside.tsx +++ b/packages/libs/kode-ui/src/patterns/SideBarLayout/components/SideBarAside.tsx @@ -28,8 +28,8 @@ export const SideBarAside: FC< }; useEffect(() => { - handleSetAsideExpanded(!!location.hash); - }, [location.hash]); + handleSetAsideExpanded(!!location?.hash); + }, [location?.hash]); return ( <>