@@ -487,8 +487,8 @@ const keywordsMap = (
487487) => {
488488 if (
489489 isCrossInstitutionalStudies &&
490- educationLevelsKeywords . length &&
491- educationModelsKeywords . length
490+ educationLevelsKeywords ? .length &&
491+ educationModelsKeywords ? .length
492492 ) {
493493 const keywordsClone = cloneDeep ( keywords ) ;
494494
@@ -873,7 +873,7 @@ const getRecurringEventDate = (
873873} ;
874874
875875const getKeywordIds = ( keywords : Array < KeywordFieldsFragment | null > ) =>
876- keywords . filter ( skipFalsyType ) . map ( ( keyword ) => keyword . atId ) ;
876+ keywords && keywords . filter ( skipFalsyType ) . map ( ( keyword ) => keyword . atId ) ;
877877
878878export const getEventInitialValues = (
879879 event : EventFieldsFragment
@@ -900,8 +900,8 @@ export const getEventInitialValues = (
900900 audienceMaxAge : event . audienceMaxAge ?? '' ,
901901 audienceMinAge : event . audienceMinAge ?? '' ,
902902 crossInstitutionalStudies : Boolean (
903- event . educationLevelsKeywords . length &&
904- event . educationModelsKeywords . length
903+ event . educationLevelsKeywords ? .length &&
904+ event . educationModelsKeywords ? .length
905905 ) ,
906906 description : getSanitizedDescription ( event ) ,
907907 events,
0 commit comments