From 566f7e921de7bbb6013d56d1353c67144206e94e Mon Sep 17 00:00:00 2001 From: Cooper Ransom Date: Sun, 24 Mar 2024 14:13:39 -0400 Subject: [PATCH] Use peak debugging tech #3 --- src/components/player/atoms/NextEpisodeButton.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/player/atoms/NextEpisodeButton.tsx b/src/components/player/atoms/NextEpisodeButton.tsx index eec3ed31..a1f857a6 100644 --- a/src/components/player/atoms/NextEpisodeButton.tsx +++ b/src/components/player/atoms/NextEpisodeButton.tsx @@ -81,10 +81,10 @@ export function NextEpisodeButton(props: { }, [setDirectMeta, nextEp, meta, props, setShouldStartFromBeginning]); useEffect(() => { - if (time === duration && meta && nextEp) { + if (time === duration && showingState === "always") { loadNextEpisode(); } - }, [time, duration, meta, nextEp, loadNextEpisode]); + }, [time, duration, showingState, loadNextEpisode]); const startCurrentEpisodeFromBeginning = useCallback(() => { if (!meta || !meta.episode) return;