diff --git a/docs/changelog.md b/docs/changelog.md index 10aa6e59..2982581e 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -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 diff --git a/umap/static/umap/js/umap.forms.js b/umap/static/umap/js/umap.forms.js index 2c24f371..5bdd6ac2 100644 --- a/umap/static/umap/js/umap.forms.js +++ b/umap/static/umap/js/umap.forms.js @@ -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; },