Skip to content

Commit

Permalink
🐛 fix: initialize scrollTimeoutRef to 0
Browse files Browse the repository at this point in the history
Signed-off-by: SimonShiki <[email protected]>
  • Loading branch information
SimonShiki committed Dec 12, 2024
1 parent 93a9c82 commit ba6243f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/lyrics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function Lyrics ({lyrics, className = ''}: LyricsProps) {
const [prevHighlight, setPrevHighlight] = useState(0);
const [lastScrolled, setLastScrolled] = useState(-1001);
const virtuosoRef = useRef<VirtuosoHandle>(null);
const scrollTimeoutRef = useRef<number>();
const scrollTimeoutRef = useRef<number>(0);
const isScrollingRef = useRef(false);

useEffect(() => {
Expand Down

0 comments on commit ba6243f

Please sign in to comment.