undefined condition added

This commit is contained in:
Julie Lenaerts 2021-10-26 11:05:13 +02:00
parent 00ad7a74d6
commit 4096e0d4df

View File

@ -163,14 +163,14 @@ export default {
return this.person.gender === 'woman' ? 'person.gender.woman' : this.person.gender === 'man' ? 'person.gender.man' : 'person.gender.neuter';
},
birthdate: function(){
if(this.person.birthdate !== null){
if(this.person.birthdate !== null || this.person.birthdate === "undefined"){
return new Date(this.person.birthdate.datetime);
} else {
return "";
}
},
deathdate: function(){
if(this.person.deathdate !== null){
if(this.person.deathdate !== null || this.person.birthdate === "undefined"){
return new Date(this.person.deathdate.datetime);
} else {
return "";