diff --git a/web/hooks/use-measure-size.ts b/web/hooks/use-measure-size.ts index 6959e241..723c2fe4 100644 --- a/web/hooks/use-measure-size.ts +++ b/web/hooks/use-measure-size.ts @@ -16,7 +16,7 @@ export function useListenElemSize( debounceMs: number | undefined = undefined ) { const handleResize = useMemo(() => { - let updateSize = () => { + const updateSize = () => { if (elemRef.current) callback(getSize(elemRef.current)) } @@ -25,7 +25,7 @@ export function useListenElemSize( : updateSize }, [callback, elemRef, debounceMs]) - let elem = elemRef.current + const elem = elemRef.current useLayoutEffect(() => { if (!elemRef.current) return