From 73a3729a7077093527dddf22479370cb97708971 Mon Sep 17 00:00:00 2001 From: Andrew P Maney Date: Sat, 4 Apr 2020 03:53:07 -0700 Subject: [PATCH] pim-types: change clone to deep clone using string fixes #119 --- src/pim-types.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pim-types.ts b/src/pim-types.ts index e2a4e19..ab595c0 100644 --- a/src/pim-types.ts +++ b/src/pim-types.ts @@ -123,7 +123,7 @@ export class EventType extends ICAL.Event implements PimType { } public clone() { - const ret = new EventType(new ICAL.Component(this.component.toJSON())); + const ret = new EventType(ICAL.Component.fromString(this.component.toString())); ret.color = this.color; return ret; } @@ -251,7 +251,7 @@ export class TaskType extends EventType { } public clone() { - const ret = new TaskType(new ICAL.Component(this.component.toJSON())); + const ret = new TaskType(ICAL.Component.fromString(this.component.toString())); ret.color = this.color; return ret; } @@ -273,7 +273,7 @@ export class ContactType implements PimType { } public clone() { - return new ContactType(new ICAL.Component(this.comp.toJSON())); + return new ContactType(ICAL.Component.fromString(this.comp.toString())); } get uid() {