Skip to content

🎥 Make videos programmatically with React

Set frame = undefined unconditionally after ownership transfer

Jonny Burger1bb7cfed53a1
diff --git a/packages/studio/src/components/Timeline/TimelineVideoInfo.tsx b/packages/studio/src/components/Timeline/TimelineVideoInfo.tsx
index 6deeadf2fe..523f98384d 100644
--- a/packages/studio/src/components/Timeline/TimelineVideoInfo.tsx
+++ b/packages/studio/src/components/Timeline/TimelineVideoInfo.tsx
@@ -391,13 +391,11 @@ export const TimelineVideoInfo: React.FC<{
if (transformed !== frame) {
frame.close();
- frame = undefined;
}
- const databaseKey = makeFrameDatabaseKey(
- src,
- transformed.timestamp,
- );
+ frame = undefined;
+
+ const databaseKey = makeFrameDatabaseKey(src, transformed.timestamp);
const existingFrame = frameDatabase.get(databaseKey);
if (existingFrame) {