From 2beba5b7b9f748e6eba351fbf97439c66b99540e Mon Sep 17 00:00:00 2001 From: Azalea Gui Date: Sat, 11 Feb 2023 17:39:48 -0500 Subject: [PATCH] [F] Fix init bcLeft --- src/App.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 81b1ff6..660f1e0 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -65,8 +65,9 @@ export default function App() { } // Set initial breadcrumb wheel to show the end path - const initWheel = (w: HTMLDivElement) => setTimeout(() => - setBcLeft(bcMax = Math.round(w.clientWidth - w.parentElement.clientWidth)), 100) + const initWheel = (w: HTMLDivElement) => setTimeout(() => { + setBcLeft(Math.max(bcMax = Math.round(w.clientWidth - w.parentElement.clientWidth), 0)) + }, 100) return ( // Full screen container