From 4096e0d4dfe3f0f8e14b1cc54bbc4363095d5b7b Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 26 Oct 2021 11:05:13 +0200 Subject: [PATCH] undefined condition added --- .../public/vuejs/_components/Entity/PersonRenderBox.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue index 128d6ed1d..f5fe283be 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue @@ -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 "";