fix error on previous commit, when creating new accourse

This commit is contained in:
Mathieu Jaumotte 2021-09-27 13:14:42 +02:00
parent eb89fa2cd4
commit 5da332a06e

View File

@ -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'