Fix champs editor on old procedures

This commit is contained in:
Paul Chavard 2019-01-18 14:53:14 +01:00
parent 6d8eaaa7c9
commit 174b01ecd4

View file

@ -57,7 +57,7 @@ export default {
return this.typeChamp === 'header_section'; return this.typeChamp === 'header_section';
}, },
options() { options() {
const options = this.item.options; const options = this.item.options || {};
for (let key of Object.keys(options)) { for (let key of Object.keys(options)) {
options[key] = castBoolean(options[key]); options[key] = castBoolean(options[key]);
} }
@ -77,7 +77,7 @@ export default {
libelle: this.item.libelle, libelle: this.item.libelle,
mandatory: this.item.mandatory, mandatory: this.item.mandatory,
description: this.item.description, description: this.item.description,
dropDownList: this.item.drop_down_list.value, dropDownList: this.item.drop_down_list && this.item.drop_down_list.value,
deleted: false, deleted: false,
clientId: `id-${clientIds++}` clientId: `id-${clientIds++}`
}; };