Skip to content

🎥 Make videos programmatically with React

Don't count showInTimeline=false parents toward timeline nested depth

JonnyBurgerb01ac759a874
diff --git a/packages/studio/src/helpers/get-timeline-nestedness.ts b/packages/studio/src/helpers/get-timeline-nestedness.ts
index 93352fbadb..f0bebc9ce0 100644
--- a/packages/studio/src/helpers/get-timeline-nestedness.ts
+++ b/packages/studio/src/helpers/get-timeline-nestedness.ts
@@ -14,5 +14,10 @@ export const getTimelineNestedLevel = (
throw new Error('has parentId but no parent');
}
- return getTimelineNestedLevel(parentSequence, allSequences, depth + 1);
+ const parentContributes = parentSequence.showInTimeline;
+ return getTimelineNestedLevel(
+ parentSequence,
+ allSequences,
+ parentContributes ? depth + 1 : depth,
+ );
};