[F] Fix init bcLeft

This commit is contained in:
Azalea Gui
2023-02-11 17:39:48 -05:00
parent 9e79518e84
commit 2beba5b7b9
+3 -2
View File
@@ -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