don't assume ref exists

This commit is contained in:
Kendall Garner 2024-04-12 09:33:48 -07:00
parent 90d3fb219d
commit 3976f5e5bf
No known key found for this signature in database
GPG Key ID: 18D2767419676C87

View File

@ -94,8 +94,8 @@ export const PlayQueue = forwardRef(({ type }: QueueProps, ref: Ref<any>) => {
} else { } else {
const player = const player =
playerData.current.player === 1 playerData.current.player === 1
? PlayersRef.current.player1 ? PlayersRef.current?.player1
: PlayersRef.current.player2; : PlayersRef.current?.player2;
const underlying = player?.getInternalPlayer(); const underlying = player?.getInternalPlayer();
if (underlying) { if (underlying) {
underlying.currentTime = 0; underlying.currentTime = 0;