Skip to content

🎥 Make videos programmatically with React

make it make sense

Jonny Burger83b6c6919f10
diff --git a/packages/studio-server/src/preview-server/sequence-props-watchers.ts b/packages/studio-server/src/preview-server/sequence-props-watchers.ts
index 09379f0f97..e2e1bff19d 100644
--- a/packages/studio-server/src/preview-server/sequence-props-watchers.ts
+++ b/packages/studio-server/src/preview-server/sequence-props-watchers.ts
@@ -44,28 +44,9 @@ const getInitialResult = ({
}): CanUpdateSequencePropsResponse => {
// Try cached nodePath first (handles stale source maps after suppressed rebuilds)
const cachedNodePath = getCachedNodePath(fileName, line, column);
- let initialResult: CanUpdateSequencePropsResponse;
- if (cachedNodePath) {
- const cachedResult = computeSequencePropsStatus({
- fileName,
- nodePath: cachedNodePath,
- keys,
- remotionRoot,
- });
- if (cachedResult.canUpdate) {
- initialResult = cachedResult;
- } else {
- // Cached nodePath no longer valid, fall back to line-based lookup
- initialResult = computeSequencePropsStatusByLine({
- fileName,
- line,
- keys,
- remotionRoot,
- });
- }
- } else {
- initialResult = computeSequencePropsStatusByLine({
+ if (!cachedNodePath) {
+ return computeSequencePropsStatusByLine({
fileName,
line,
keys,
@@ -73,7 +54,23 @@ const getInitialResult = ({
});
}
- return initialResult;
+ const cachedResult = computeSequencePropsStatus({
+ fileName,
+ nodePath: cachedNodePath,
+ keys,
+ remotionRoot,
+ });
+
+ if (cachedResult.canUpdate) {
+ return cachedResult;
+ }
+
+ return computeSequencePropsStatusByLine({
+ fileName,
+ line,
+ keys,
+ remotionRoot,
+ });
};
export const subscribeToSequencePropsWatchers = ({