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'; return this.person.gender === 'woman' ? 'person.gender.woman' : this.person.gender === 'man' ? 'person.gender.man' : 'person.gender.neuter';
}, },
birthdate: function(){ birthdate: function(){
if(this.person.birthdate !== null){ if(this.person.birthdate !== null || this.person.birthdate === "undefined"){
return new Date(this.person.birthdate.datetime); return new Date(this.person.birthdate.datetime);
} else { } else {
return ""; return "";
} }
}, },
deathdate: function(){ deathdate: function(){
if(this.person.deathdate !== null){ if(this.person.deathdate !== null || this.person.birthdate === "undefined"){
return new Date(this.person.deathdate.datetime); return new Date(this.person.deathdate.datetime);
} else { } else {
return ""; return "";