Skip to content

Commit

Permalink
Merge pull request #3042 from remotion-dev/fix-studio-crash-due-to-co…
Browse files Browse the repository at this point in the history
…nditional-showintimeline-prop

Former-commit-id: 709268a [formerly c79e3cb]
Former-commit-id: 94ccec44fe94a9ee5e7377b3cf65099be40aaa3f [formerly 0ce29da]
Former-commit-id: 54833fe
  • Loading branch information
JonnyBurger authored Oct 23, 2023
2 parents 1144b7b + fa08455 commit 658f52f
Show file tree
Hide file tree
Showing 34 changed files with 9 additions and 17 deletions.
6 changes: 6 additions & 0 deletions packages/cli/src/editor/components/Timeline/is-collapsed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ export const isTrackHidden = (
(t) => t.sequence.id === track.sequence.parent,
) as TrackWithHash;

// Due to effects and conditional `showInTimeline`, a parent
// may not exist in the `allTracks` array.
if (!parent) {
return true;
}

if (isTrackCollapsed(parent.hash, viewState)) {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ export const getTimelineSequenceSequenceSortKey = (

const parent = tracks.find((t) => t.sequence.id === track.sequence.parent);
if (!parent) {
throw new Error('Cannot find parent');
// Due to effects and conditional `showInTimeline`, a parent
// may not exist in the `allTracks` array.
return id;
}

const firstParentWithSameHash = tracks.find((a) => {
Expand Down
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file added packages/docs/static/img/OverlayInDavinci.mov
Binary file not shown.

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Binary file added packages/docs/static/img/lottie.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion packages/docs/static/img/lottie.gif.REMOVED.git-id

This file was deleted.

Binary file added packages/docs/static/img/render-as-gif.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion packages/docs/static/img/render-as-gif.gif.REMOVED.git-id

This file was deleted.

Binary file added packages/example/public/bigbuckbunny.mp4
Binary file not shown.
1 change: 0 additions & 1 deletion packages/example/public/bigbuckbunny.mp4.REMOVED.git-id

This file was deleted.

Binary file added packages/example/public/corrupted.mp4
Binary file not shown.
1 change: 0 additions & 1 deletion packages/example/public/corrupted.mp4.REMOVED.git-id

This file was deleted.

Binary file added packages/example/public/iphonevideo.mov
Binary file not shown.
1 change: 0 additions & 1 deletion packages/example/public/iphonevideo.mov.REMOVED.git-id

This file was deleted.

Binary file added packages/example/public/variablefps.webm
Binary file not shown.
1 change: 0 additions & 1 deletion packages/example/public/variablefps.webm.REMOVED.git-id

This file was deleted.

Binary file added packages/example/public/vid1.mp4
Binary file not shown.
1 change: 0 additions & 1 deletion packages/example/public/vid1.mp4.REMOVED.git-id

This file was deleted.

0 comments on commit 658f52f

Please sign in to comment.