The road to zero TypeScript errors (#1756)

* Type fixes

* Type fixes

* Type fixes

* Type fixes

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Omar Lópezandkodiakhq[bot] authored and GitHub committed 2022-02-10 10:44:46 +00:00
1 parent 798930bf23
commit 5d0ba3dafc
14 files changed
+54 -53

No files matched your search

+5 -4
View File
@@ -18,7 +18,7 @@ export interface EventResult {
success: boolean;
uid: string;
createdEvent?: Event;
updatedEvent?: Event;
updatedEvent?: Event | Event[];
originalEvent: CalendarEvent;
}
@@ -207,9 +207,10 @@ export default class EventManager {
// If and only if event type is a dedicated meeting, update the dedicated video meeting.
if (isDedicated) {
const result = await this.updateVideoEvent(evt, booking);
if (result.updatedEvent) {
evt.videoCallData = result.updatedEvent;
evt.location = result.updatedEvent.url;
const [updatedEvent] = Array.isArray(result.updatedEvent) ? result.updatedEvent : [result.updatedEvent];
if (updatedEvent) {
evt.videoCallData = updatedEvent;
evt.location = updatedEvent.url;
}
results.push(result);
}