Fix form question disappearing

pull/1/head
yflory 3 years ago
parent ead5ad217c
commit 228a44e36c

@ -2573,7 +2573,7 @@ define([
// Required radio displayed only for types that have an "isEmpty" function // Required radio displayed only for types that have an "isEmpty" function
var requiredDiv; var requiredDiv;
if (APP.isEditor && !isStatic && data.isEmpty) { if (APP.isEditor && !isStatic && data.isEmpty) {
if (!block.opts) { block.opts = {}; } if (!block.opts) { block.opts = TYPES[type].defaultOpts; }
var isRequired = Boolean(block.opts.required); var isRequired = Boolean(block.opts.required);
var radioOn = UI.createRadio('cp-form-required-'+uid, 'cp-form-required-on', var radioOn = UI.createRadio('cp-form-required-'+uid, 'cp-form-required-on',
Messages.form_required_on, isRequired, { Messages.form_required_on, isRequired, {

Loading…
Cancel
Save