From 622f61903b13be07c89994f04286e4ed3821acfb Mon Sep 17 00:00:00 2001 From: Josh Perez <60019601+josh-signal@users.noreply.github.com> Date: Tue, 18 Oct 2022 20:18:36 -0400 Subject: [PATCH] Fix for video stories not playing --- ts/components/StoryViewer.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ts/components/StoryViewer.tsx b/ts/components/StoryViewer.tsx index 1cc011d166cf..5a0db987e88e 100644 --- a/ts/components/StoryViewer.tsx +++ b/ts/components/StoryViewer.tsx @@ -265,6 +265,10 @@ export const StoryViewer = ({ // We need to be careful about this effect refreshing, it should only run // every time a story changes or its duration changes. useEffect(() => { + if (!storyDuration) { + return; + } + strictAssert( progressBarRef.current != null, "progressBarRef can't be null"