fix: use number | undefined for debounce timer ref (TS strict compat)

This commit is contained in:
lucaronin
2026-02-28 12:38:23 +01:00
parent 84c9f26364
commit 8388029cfb

View File

@@ -23,7 +23,7 @@ export function useHeadingTitleSync({
onTitleSync,
}: HeadingTitleSyncConfig) {
const syncActiveRef = useRef(true)
const debounceTimerRef = useRef<ReturnType<typeof setTimeout> | undefined>(undefined)
const debounceTimerRef = useRef<number | undefined>(undefined)
const activeTabPathRef = useRef(activeTabPath)
// eslint-disable-next-line react-hooks/refs
activeTabPathRef.current = activeTabPath