From 3976f5e5bfd4719a8882aa2601f41c99392def8e Mon Sep 17 00:00:00 2001 From: Kendall Garner <17521368+kgarner7@users.noreply.github.com> Date: Fri, 12 Apr 2024 09:33:48 -0700 Subject: [PATCH] don't assume ref exists --- src/renderer/features/now-playing/components/play-queue.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/features/now-playing/components/play-queue.tsx b/src/renderer/features/now-playing/components/play-queue.tsx index 0ee839e8..de60ba14 100644 --- a/src/renderer/features/now-playing/components/play-queue.tsx +++ b/src/renderer/features/now-playing/components/play-queue.tsx @@ -94,8 +94,8 @@ export const PlayQueue = forwardRef(({ type }: QueueProps, ref: Ref) => { } else { const player = playerData.current.player === 1 - ? PlayersRef.current.player1 - : PlayersRef.current.player2; + ? PlayersRef.current?.player1 + : PlayersRef.current?.player2; const underlying = player?.getInternalPlayer(); if (underlying) { underlying.currentTime = 0;