Browse Source

Add undefined check for tableref

- Suppress error when switching between pages quickly
master
jeffvli 3 years ago
parent
commit
39a47b21b0
  1. 2
      src/components/player/NowPlayingView.tsx

2
src/components/player/NowPlayingView.tsx

@ -62,7 +62,7 @@ const NowPlayingView = () => {
if (playQueue.scrollWithCurrentSong) {
setTimeout(() => {
const rowHeight = Number(settings.getSync('musicListRowHeight'));
tableRef?.current.table.current?.scrollTop(
tableRef?.current?.table.current?.scrollTop(
rowHeight * playQueue.currentIndex - rowHeight * 2 > 0
? rowHeight * playQueue.currentIndex - rowHeight * 2
: 0

Loading…
Cancel
Save