From f5a38c3f89bb3d70c1657eb3b21ea3d85ed4af15 Mon Sep 17 00:00:00 2001 From: Hariom Balhara Date: Wed, 10 May 2023 20:07:16 +0530 Subject: [PATCH] Add missing zoho-bigin import (#8798) --- packages/app-store/_utils/getCalendar.ts | 9 ++++++++- packages/app-store/index.ts | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/app-store/_utils/getCalendar.ts b/packages/app-store/_utils/getCalendar.ts index 5fddb8b419..b2ed77fdce 100644 --- a/packages/app-store/_utils/getCalendar.ts +++ b/packages/app-store/_utils/getCalendar.ts @@ -12,7 +12,14 @@ export const getCalendar = async (credential: CredentialPayload | null): Promise if (calendarType?.endsWith("_other_calendar")) { calendarType = calendarType.split("_other_calendar")[0]; } - const calendarApp = await appStore[calendarType.split("_").join("") as keyof typeof appStore](); + const calendarAppImportFn = appStore[calendarType.split("_").join("") as keyof typeof appStore]; + + if (!calendarAppImportFn) { + log.warn(`calendar of type ${calendarType} is not implemented`); + return null; + } + + const calendarApp = await calendarAppImportFn(); if (!(calendarApp && "lib" in calendarApp && "CalendarService" in calendarApp.lib)) { log.warn(`calendar of type ${calendarType} is not implemented`); return null; diff --git a/packages/app-store/index.ts b/packages/app-store/index.ts index 1453334b4c..cf5271ecba 100644 --- a/packages/app-store/index.ts +++ b/packages/app-store/index.ts @@ -28,6 +28,7 @@ const appStore = { exchangecalendar: () => import("./exchangecalendar"), facetime: () => import("./facetime"), sylapsvideo: () => import("./sylapsvideo"), + "zoho-bigin": () => import("./zoho-bigin"), }; export default appStore;