From 52d4ad996792527a22b197e2a118e4fe91335280 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Sun, 24 Nov 2019 16:40:33 +0200 Subject: [PATCH] ImportDialog: adjust to the changes in the previous commit. --- src/Journals/ImportDialog.tsx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Journals/ImportDialog.tsx b/src/Journals/ImportDialog.tsx index 8dad9c1..aed6cad 100644 --- a/src/Journals/ImportDialog.tsx +++ b/src/Journals/ImportDialog.tsx @@ -154,11 +154,8 @@ class ImportDialog extends React.Component { private onFileDropEvent(acceptedFiles: File[], rejectedFiles: File[]) { const itemsCreator = (fileText: string) => { const calendarComp = new ICAL.Component(ICAL.parse(fileText)); - const timezoneComp = calendarComp.getFirstSubcomponent('vtimezone'); return calendarComp.getAllSubcomponents('vevent').map((comp) => { - const ret = new EventType(comp); - ret.timezoneComp = timezoneComp; - return ret; + return new EventType(comp); }); }; @@ -168,11 +165,8 @@ class ImportDialog extends React.Component { private onFileDropTask(acceptedFiles: File[], rejectedFiles: File[]) { const itemsCreator = (fileText: string) => { const calendarComp = new ICAL.Component(ICAL.parse(fileText)); - const timezoneComp = calendarComp.getFirstSubcomponent('vtimezone'); return calendarComp.getAllSubcomponents('vtodo').map((comp) => { - const ret = new TaskType(comp); - ret.timezoneComp = timezoneComp; - return ret; + return new TaskType(comp); }); };