forked from tykayn/funky-framadate-front
empty date list after emptying calendar list
This commit is contained in:
parent
40b3a16e0f
commit
8921348bbb
@ -733,18 +733,21 @@ export class PollService implements Resolve<Poll> {
|
||||
*/
|
||||
convertCalendarToText() {
|
||||
console.log('this.dateChoiceList', this.dateChoiceList);
|
||||
// if(!this.dateChoiceList.length){
|
||||
// return [];
|
||||
// }
|
||||
let converted = [];
|
||||
for (let someDate of this.calendar) {
|
||||
converted.push(this.DateUtilitiesService.convertDateToDateChoiceObject(someDate));
|
||||
}
|
||||
this.dateChoiceList = converted.sort((first: any, second: any) => {
|
||||
return first.date_object - second.date_object;
|
||||
});
|
||||
|
||||
return converted;
|
||||
if (this.calendar && this.calendar.length) {
|
||||
let converted = [];
|
||||
for (let someDate of this.calendar) {
|
||||
converted.push(this.DateUtilitiesService.convertDateToDateChoiceObject(someDate));
|
||||
}
|
||||
|
||||
this.dateChoiceList = converted.sort((first: any, second: any) => {
|
||||
return first.date_object - second.date_object;
|
||||
});
|
||||
return converted;
|
||||
} else {
|
||||
this.dateChoiceList = [];
|
||||
}
|
||||
return this.dateChoiceList;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user