From 174b01ecd49797c54772e8d8f49070ca9a600183 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Fri, 18 Jan 2019 14:53:14 +0100 Subject: [PATCH] Fix champs editor on old procedures --- app/javascript/new_design/administrateur/DraggableItem.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/new_design/administrateur/DraggableItem.js b/app/javascript/new_design/administrateur/DraggableItem.js index f9a55edbb..70dee126f 100644 --- a/app/javascript/new_design/administrateur/DraggableItem.js +++ b/app/javascript/new_design/administrateur/DraggableItem.js @@ -57,7 +57,7 @@ export default { return this.typeChamp === 'header_section'; }, options() { - const options = this.item.options; + const options = this.item.options || {}; for (let key of Object.keys(options)) { options[key] = castBoolean(options[key]); } @@ -77,7 +77,7 @@ export default { libelle: this.item.libelle, mandatory: this.item.mandatory, 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, clientId: `id-${clientIds++}` };