Skip to content

🎥 Make videos programmatically with React

Avoid duplicate frame context updates

Igor Samokhovets6d962930ae18
diff --git a/packages/studio/src/components/FramePersistor.tsx b/packages/studio/src/components/FramePersistor.tsx
index 9631cc148b..331772595f 100644
--- a/packages/studio/src/components/FramePersistor.tsx
+++ b/packages/studio/src/components/FramePersistor.tsx
@@ -11,7 +11,7 @@ export const FramePersistor: React.FC = () => {
useEffect(() => {
if (!playing) {
setFrame((f) => {
- const newObj = {...f, [config.id]: frame};
+ const newObj = f[config.id] === frame ? f : {...f, [config.id]: frame};
Internals.persistCurrentFrame(newObj);
return newObj;
});