Fixing calWarnings error on reschedule (#5711)

* Fixing calWarnings error on reschedule

* Update packages/core/CalendarManager.ts

Co-authored-by: Alex van Andel <me@alexvanandel.com>

* Update packages/core/CalendarManager.ts

Co-authored-by: Alex van Andel <me@alexvanandel.com>

* Going back on potential fix

Co-authored-by: Alex van Andel <me@alexvanandel.com>
This commit is contained in:
Leo Giovanetti
2022-11-28 15:43:24 +00:00
committed by GitHub
co-authored by Alex van Andel
parent 9a12b5a0ac
commit 1f74fc394a
+2 -2
View File
@@ -267,9 +267,9 @@ export const updateEvent = async (
: undefined;
if (Array.isArray(updatedResult)) {
calWarnings = updatedResult.flatMap((res) => res.additionalInfo.calWarnings ?? []);
calWarnings = updatedResult.flatMap((res) => res.additionalInfo?.calWarnings ?? []);
} else {
calWarnings = updatedResult?.additionalInfo.calWarnings;
calWarnings = updatedResult?.additionalInfo?.calWarnings || [];
}
return {