Skip to content

Commit

Permalink
duplicate timelines need to be marked changed
Browse files Browse the repository at this point in the history
if not, we might lose the duplicated timeline when not saved and trying to reload
  • Loading branch information
janmonschke committed Nov 1, 2024
1 parent 7b05079 commit 71b45bf
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ export const useUpdateTimeline = () => {
}: UpdateTimeline) => {
let _timeline = timeline;
if (duplicate) {
_timeline = { ...timeline, updated: undefined, changed: undefined, version: null };
// `changed: true` in this case indicates that the timeline hasn't been saved yet
_timeline = { ...timeline, updated: undefined, changed: true, version: null };
}
if (!isEmpty(_timeline.indexNames)) {
dispatch(
Expand Down

0 comments on commit 71b45bf

Please sign in to comment.