fixed ternary choice dealing with unknown values (fix #633)

This commit is contained in:
Yohan Boniface 2018-09-11 20:06:35 +02:00
parent b72650fafe
commit d041001168
2 changed files with 3 additions and 2 deletions

View file

@ -51,7 +51,8 @@ COMMIT;
## 1.0.0.rc-5
- Fixed user autocompletion in permissions panel (cf #635)
- fixed user autocompletion in permissions panel (cf #635)
- fixed ternary choice dealing with unknown values (cf #633)
## 1.0.0.rc-4

View file

@ -538,7 +538,7 @@ L.FormBuilder.MultiChoice = L.FormBuilder.Element.extend({
fetch: function () {
var value = this.backup = this.toHTML();
if (value === null || value === undefined) value = this.default;
if (!this.container.querySelector('input[type="radio"][value="' + value + '"]')) value = this.default;
this.container.querySelector('input[type="radio"][value="' + value + '"]').checked = true;
},