Skip to content
Snippets Groups Projects
Commit 5062c35b authored by rhenck's avatar rhenck
Browse files

Fix element model instantiation with empty label strings

parent 52fa35d8
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,7 @@ export class CheckboxElement extends InputElement implements CheckboxProperties ...@@ -32,7 +32,7 @@ export class CheckboxElement extends InputElement implements CheckboxProperties
if (environment.strictInstantiation) { if (environment.strictInstantiation) {
throw new InstantiationEror('Error at Checkbox instantiation', element); throw new InstantiationEror('Error at Checkbox instantiation', element);
} }
if (element?.label) this.label = element.label; if (element?.label !== undefined) this.label = element.label;
if (element?.value !== undefined) this.value = element.value; if (element?.value !== undefined) this.value = element.value;
if (element?.crossOutChecked !== undefined) this.crossOutChecked = element.crossOutChecked; if (element?.crossOutChecked !== undefined) this.crossOutChecked = element.crossOutChecked;
this.dimensions = PropertyGroupGenerators.generateDimensionProps({ this.dimensions = PropertyGroupGenerators.generateDimensionProps({
......
...@@ -39,7 +39,7 @@ export class RadioButtonGroupElement extends InputElement implements OptionEleme ...@@ -39,7 +39,7 @@ export class RadioButtonGroupElement extends InputElement implements OptionEleme
if (environment.strictInstantiation) { if (environment.strictInstantiation) {
throw new InstantiationEror('Error at RadioButtonGroupElement instantiation', element); throw new InstantiationEror('Error at RadioButtonGroupElement instantiation', element);
} }
if (element?.label) this.label = element.label; if (element?.label !== undefined) this.label = element.label;
if (element?.options) this.options = [...element.options]; if (element?.options) this.options = [...element.options];
if (element?.alignment) this.alignment = element.alignment; if (element?.alignment) this.alignment = element.alignment;
if (element?.strikeOtherOptions) this.strikeOtherOptions = element.strikeOtherOptions; if (element?.strikeOtherOptions) this.strikeOtherOptions = element.strikeOtherOptions;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment