Skip to content

Scheduling infrastructure for absolutely everyone.

Quick fixes to core libs (#2263)

Omar Lópezf7a2e1e7acec
diff --git a/packages/app-store/_utils/getCalendar.ts b/packages/app-store/_utils/getCalendar.ts
index 6c1c5d5c30d..15ad30678f9 100644
--- a/packages/app-store/_utils/getCalendar.ts
+++ b/packages/app-store/_utils/getCalendar.ts
@@ -11,7 +11,7 @@ export const getCalendar = (credential: Credential | null): Calendar | null => {
if (!credential) return null;
const { type: calendarType } = credential;
const calendarApp = appStore[calendarType.split("_").join("") as keyof typeof appStore];
- if (!calendarApp || !("lib" in calendarApp && "CalendarService" in calendarApp.lib)) {
+ if (!(calendarApp && "lib" in calendarApp && "CalendarService" in calendarApp.lib)) {
log.warn(`calendar of type ${calendarType} does not implemented`);
return null;
}
diff --git a/packages/core/videoClient.ts b/packages/core/videoClient.ts
index dcc4de29fa0..fb26e69f016 100644
--- a/packages/core/videoClient.ts
+++ b/packages/core/videoClient.ts
@@ -18,7 +18,7 @@ const getVideoAdapters = (withCredentials: Credential[]): VideoApiAdapter[] =>
withCredentials.reduce<VideoApiAdapter[]>((acc, cred) => {
const appName = cred.type.split("_").join(""); // Transform `zoom_video` to `zoomvideo`;
const app = appStore[appName as keyof typeof appStore];
- if ("lib" in app && "VideoApiAdapter" in app.lib) {
+ if (app && "lib" in app && "VideoApiAdapter" in app.lib) {
const makeVideoApiAdapter = app.lib.VideoApiAdapter as VideoApiAdapterFactory;
const videoAdapter = makeVideoApiAdapter(cred);
acc.push(videoAdapter);