Skip to content

🎥 Make videos programmatically with React

niice

JonnyBurgera500fbe52e72
diff --git a/packages/studio/src/components/Timeline/TimelineListItem.tsx b/packages/studio/src/components/Timeline/TimelineListItem.tsx
index 8e74775b98..ee2b31faf6 100644
--- a/packages/studio/src/components/Timeline/TimelineListItem.tsx
+++ b/packages/studio/src/components/Timeline/TimelineListItem.tsx
@@ -118,6 +118,15 @@ export const TimelineListItem: React.FC<{
return;
}
+ if (getIsJsxInMapCallback(nodePath)) {
+ const message =
+ 'This sequence is rendered inside a .map() callback. Deleting removes all sequences in that callback. Continue?';
+ // eslint-disable-next-line no-alert -- native confirm before applying duplicate codemod in .map callbacks
+ if (!window.confirm(message)) {
+ return;
+ }
+ }
+
try {
const result = await callApi('/api/delete-jsx-node', {
fileName: validatedLocation.source,