File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -224,27 +224,21 @@ export const matchesAnnotationTarget = (
224224const matchesAnnotationTargetWithSegment = (
225225 observation : Observation ,
226226 targets : AnnotationTarget [ ] ,
227- segment ? : string ,
228- segmentComponentId ? : string
227+ segment : string ,
228+ segmentComponentId : string
229229) => {
230230 if ( targets . length === 0 ) {
231231 return false ;
232232 }
233233
234- for ( const target of targets ) {
234+ return targets . every ( ( target ) => {
235235 if ( target . componentId === segmentComponentId ) {
236- if ( target . value !== segment ) {
237- return false ;
238- }
236+ return target . value === segment ;
239237 } else {
240238 const observationValue = observation [ `${ target . componentId } /__iri__` ] ;
241- if ( observationValue !== target . value ) {
242- return false ;
243- }
239+ return observationValue === target . value ;
244240 }
245- }
246-
247- return true ;
241+ } ) ;
248242} ;
249243
250244export const hasSegmentAnnotation = (
You can’t perform that action at this time.
0 commit comments