diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/CourseLocation.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/CourseLocation.vue index 3e6b40c28..7ae25b25c 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/CourseLocation.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourse/components/CourseLocation.vue @@ -135,12 +135,17 @@ export default { return this.accompanyingCourse.participations.filter(p => p.enddate !== null); }, hasNoPersonLocation() { + let addressInParticipations_ = [] this.currentParticipations.forEach(p => { addressInParticipations_.push(this.checkHouseholdAddressForParticipation(p)); }); + const booleanReducer = (previousValue, currentValue) => previousValue || currentValue; - let addressInParticipations = addressInParticipations_.reduce(booleanReducer); + + let addressInParticipations = (addressInParticipations_.length > 0) ? + addressInParticipations_.reduce(booleanReducer) : false; + //console.log(addressInParticipations_, addressInParticipations); return ( this.accompanyingCourse.step !== 'DRAFT'