Avoid exec the getAvailability function when there are`t calendar selected (#9192)
Co-authored-by: Joe Au-Yeung <[email protected]> Co-authored-by: Hariom Balhara <[email protected]>
This commit is contained in:
1 file changed
+1
@@ -151,6 +151,7 @@ export const getCachedResults = async (
|
||||
* TODO: Migrate credential type or appId
|
||||
*/
|
||||
const passedSelectedCalendars = selectedCalendars.filter((sc) => sc.integration === type);
|
||||
if (!passedSelectedCalendars.length) return [];
|
||||
/** We extract external Ids so we don't cache too much */
|
||||
const selectedCalendarIds = passedSelectedCalendars.map((sc) => sc.externalId);
|
||||
/** If we don't then we actually fetch external calendars (which can be very slow) */
|
||||
|
||||
Reference in new issue
Block a user