Fixing calWarnings error on reschedule (#5711)

* Fixing calWarnings error on reschedule

* Update packages/core/CalendarManager.ts

Co-authored-by: Alex van Andel <[email protected]>

* Update packages/core/CalendarManager.ts

Co-authored-by: Alex van Andel <[email protected]>

* Going back on potential fix

Co-authored-by: Alex van Andel <[email protected]>
This commit is contained in:
Leo GiovanettiandAlex van Andel authored and GitHub committed 2022-11-28 15:43:24 +00:00
1 parent 9a12b5a0ac
commit 1f74fc394a
1 file changed
+2 -2
+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 {