Added condition when updating event
This commit is contained in:
parent
0a60a62910
commit
936338db3e
1 changed files with 2 additions and 1 deletions
|
@ -561,7 +561,8 @@ const updateEvent = async (
|
||||||
): Promise<unknown> => {
|
): Promise<unknown> => {
|
||||||
const parser: CalEventParser = new CalEventParser(calEvent);
|
const parser: CalEventParser = new CalEventParser(calEvent);
|
||||||
const newUid: string = parser.getUid();
|
const newUid: string = parser.getUid();
|
||||||
const richEvent: CalendarEvent = parser.asRichEventPlain();
|
const richEvent: CalendarEvent =
|
||||||
|
credential.type === "office365_calendar" ? parser.asRichEvent() : parser.asRichEventPlain();
|
||||||
|
|
||||||
const updateResult = credential
|
const updateResult = credential
|
||||||
? await calendars([credential])[0].updateEvent(uidToUpdate, richEvent)
|
? await calendars([credential])[0].updateEvent(uidToUpdate, richEvent)
|
||||||
|
|
Loading…
Reference in a new issue