Added fallback if missing date
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
soraefir 2023-07-19 09:52:53 +02:00
parent a1f248c39f
commit d8ab504bcd
Signed by: sora
GPG Key ID: A362EA0491E2EEA0

View File

@ -204,7 +204,11 @@ const app = new Vue({
}, },
total_date: function(){ total_date: function(){
if(this.journey_data.main.length==0) return ''; if(this.journey_data.main.length==0) return '';
return `${this.format_date(this.journey_data.main[0].dateRange[0])} - ${this.format_date(this.journey_data.main[this.journey_data.main.length-1].dateRange[0])}`; try{
return `${this.format_date(this.journey_data.main[0].dateRange[0])} - ${this.format_date(this.journey_data.main[this.journey_data.main.length-1].dateRange[0])}`;
}catch{
return '';
}
}, },
update_date: function(idx){ update_date: function(idx){
let dateRange = this.journey_data.main[idx].dateRange; let dateRange = this.journey_data.main[idx].dateRange;