diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue index 979f53d74..669c225dd 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/OnTheFly/components/OnTheFly.vue @@ -235,8 +235,12 @@ export default { type = this.$refs.castNew.radioType; data = this.$refs.castNew.castDataByType(); // console.log('type', type); - data.civility = data.civility !== null ? {type: 'chill_main_civility', id: data.civility.id} : null; - data.profession = data.profession !== null ? {type: 'third_party_profession', id: data.profession.id} : null; + if (typeof data.civility !== 'undefined' && null !== data.civility) { + data.civility = data.civility !== null ? {type: 'chill_main_civility', id: data.civility.id} : null; + } + if (typeof data.civility !== 'undefined' && null !== data.profession) { + data.profession = data.profession !== null ? {type: 'third_party_profession', id: data.profession.id} : null; + } // console.log('onthefly data', data); } } else { diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js index 6ae44be41..1371989ba 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/_js/i18n.js @@ -69,7 +69,7 @@ const messages = { person: "Usager" }, holder: "Titulaire", - years_old: "an | {n} an | {n} ans", + years_old: "1 an | {n} an | {n} ans", residential_address: "Adresse de résidence", located_at: "réside chez" }