Skip to content

πŸŽ₯ Make videos programmatically with React

Revert client-side `cancelled` flag

Jonny Burgerd6266780639a
diff --git a/packages/studio/src/components/Timeline/use-sequence-props-subscription.ts b/packages/studio/src/components/Timeline/use-sequence-props-subscription.ts
index 8271fe36b8..92064b3fae 100644
--- a/packages/studio/src/components/Timeline/use-sequence-props-subscription.ts
+++ b/packages/studio/src/components/Timeline/use-sequence-props-subscription.ts
@@ -89,7 +89,6 @@ export const useSequencePropsSubscription = (
return;
}
- let cancelled = false;
const keys = schemaKeysString.split(',');
callApi('/api/subscribe-to-sequence-props', {
@@ -100,10 +99,6 @@ export const useSequencePropsSubscription = (
clientId,
})
.then((result) => {
- if (cancelled) {
- return;
- }
-
if (
currentLocationSource.current !== locationSource ||
currentLocationLine.current !== locationLine ||
@@ -121,17 +116,12 @@ export const useSequencePropsSubscription = (
}
})
.catch((err) => {
- if (cancelled) {
- return;
- }
-
nodePathRef.current = null;
Internals.Log.error(err);
setPropStatusesForSequence(null);
});
return () => {
- cancelled = true;
const currentNodePath = nodePathRef.current;
// Only clear props on true unmount, not on re-subscribe due to
// line number changes β€” avoids flicker while re-subscribing.