File tree Expand file tree Collapse file tree 4 files changed +379
-227
lines changed
router/event/__snapshots__ Expand file tree Collapse file tree 4 files changed +379
-227
lines changed Original file line number Diff line number Diff line change @@ -140,11 +140,9 @@ export const EventConfig = z
140140 }
141141 }
142142
143- if ( event . placeOfEvent ) {
144- const eventPlaceFieldId = getDeclarationFields ( event ) . find (
145- ( { id } ) =>
146- Array . isArray ( event . placeOfEvent ) &&
147- event . placeOfEvent . find ( ( config ) => config . $$field === id )
143+ if ( Array . isArray ( event . placeOfEvent ) ) {
144+ const eventPlaceFieldId = getDeclarationFields ( event ) . find ( ( { id } ) =>
145+ event . placeOfEvent ?. find ( ( config ) => config . $$field === id )
148146 )
149147 if ( ! eventPlaceFieldId ) {
150148 ctx . addIssue ( {
Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ exports[`Returns relevant events in right order 1`] = `
136136 " createdByUserType" : " [sanitized]" ,
137137 },
138138 },
139+ " placeOfEvent" : " [sanitized]" ,
139140 " potentialDuplicates" : [],
140141 " status" : " DECLARED" ,
141142 " trackingId" : " [sanitized]" ,
@@ -183,6 +184,7 @@ exports[`Returns relevant events in right order 1`] = `
183184 " createdByUserType" : " [sanitized]" ,
184185 },
185186 },
187+ " placeOfEvent" : " [sanitized]" ,
186188 " potentialDuplicates" : [],
187189 " status" : " DECLARED" ,
188190 " trackingId" : " [sanitized]" ,
@@ -228,7 +230,7 @@ exports[`Returns relevant events in right order 1`] = `
228230 " createdByUserType" : " [sanitized]" ,
229231 },
230232 },
231- " placeOfEvent" : " [sanitized]" ,
233+ " placeOfEvent" : " [sanitized]" ,
232234 " potentialDuplicates" : [],
233235 " status" : " DECLARED" ,
234236 " trackingId" : " [sanitized]" ,
You can’t perform that action at this time.
0 commit comments