Quick fixes to core libs (#2263)

This commit is contained in:
Omar López authored and GitHub committed 2022-03-23 20:29:27 -07:00
1 parent 1a27edd462
commit f7a2e1e7ac
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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;
}