From ed3170af76ddf85833d9022da0937993fd5c197e Mon Sep 17 00:00:00 2001 From: Fredrik Burmester Date: Mon, 19 Aug 2024 22:05:23 +0200 Subject: [PATCH] fix: invalid query --- components/CurrentlyPlayingBar.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/CurrentlyPlayingBar.tsx b/components/CurrentlyPlayingBar.tsx index 61854a5f..911cb81e 100644 --- a/components/CurrentlyPlayingBar.tsx +++ b/components/CurrentlyPlayingBar.tsx @@ -118,8 +118,15 @@ export const CurrentlyPlayingBar: React.FC = () => { const onProgress = useCallback( ({ currentTime }: OnProgressData) => { - if (!sessionData?.PlaySessionId || !api || !currentlyPlaying?.item.Id) + if ( + !sessionData?.PlaySessionId || + !api || + !currentlyPlaying?.item.Id || + !user?.Id || + !currentTime + ) { return; + } const newProgress = currentTime * 10000000; setProgress(newProgress);