From 5ad410ad7429955ef0f5ca8deb91184eca23fed1 Mon Sep 17 00:00:00 2001 From: Godzilla675 <131464726+Godzilla675@users.noreply.github.com> Date: Thu, 12 Feb 2026 14:41:09 +0000 Subject: [PATCH] fix(web): prevent excessive timeline dispatch in Composition component --- .../components/editor/player/remotion/sequence/composition.tsx | 1 + test_tsx.ts | 1 + 2 files changed, 2 insertions(+) create mode 100644 test_tsx.ts diff --git a/apps/web/app/components/editor/player/remotion/sequence/composition.tsx b/apps/web/app/components/editor/player/remotion/sequence/composition.tsx index 3e562c7..dbda453 100644 --- a/apps/web/app/components/editor/player/remotion/sequence/composition.tsx +++ b/apps/web/app/components/editor/player/remotion/sequence/composition.tsx @@ -19,6 +19,7 @@ const Composition = () => { if (Math.abs(currentTimeInSeconds - previousTime.current) > THRESHOLD) { if (currentTimeInSeconds !== undefined) { dispatch(setCurrentTime(currentTimeInSeconds)); + previousTime.current = currentTimeInSeconds; } } diff --git a/test_tsx.ts b/test_tsx.ts new file mode 100644 index 0000000..b5e94dd --- /dev/null +++ b/test_tsx.ts @@ -0,0 +1 @@ +console.log('Hello from tsx')