From dcb1337905aa75f2194063d8020633438109d59e Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 6 Aug 2020 10:58:43 +0300 Subject: [PATCH] Event clone: also clone collection/item Uid. --- src/Calendars/Calendar.tsx | 1 - src/pim-types.ts | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Calendars/Calendar.tsx b/src/Calendars/Calendar.tsx index 09abf9e..d78084f 100644 --- a/src/Calendars/Calendar.tsx +++ b/src/Calendars/Calendar.tsx @@ -66,7 +66,6 @@ class Calendar extends React.PureComponent { const shift = next.subtractDateTz(event.startDate); const ev = event.clone(); - (ev as any).journalUid = (event as any).journalUid; ev.startDate.addDuration(shift); ev.endDate.addDuration(shift); entries.push(ev); diff --git a/src/pim-types.ts b/src/pim-types.ts index 77fb03d..f4932ac 100644 --- a/src/pim-types.ts +++ b/src/pim-types.ts @@ -139,6 +139,8 @@ export class EventType extends ICAL.Event implements PimType { public clone() { const ret = new EventType(ICAL.Component.fromString(this.component.toString())); ret.color = this.color; + ret.collectionUid = this.collectionUid; + ret.itemUid = this.itemUid; return ret; } }