Skip to content
Snippets Groups Projects

Issue #3447691 - Change the container element for empty variation fields to a SPAN element

Merged Issue #3447691 - Change the container element for empty variation fields to a SPAN element
1 unresolved thread
1 unresolved thread
Files
2
@@ -112,10 +112,11 @@ class ProductVariationFieldRenderer implements ProductVariationFieldRendererInte
if (isset($rendered_field['#type']) && $rendered_field['#type'] == 'view') {
return $rendered_field;
}
// Ensure that a <div> is rendered even if the field is empty, to allow
// Ensure that a <span> is rendered even if the field is empty, to allow
// field replacement to work when the variation changes.
if (!Element::children($rendered_field)) {
$rendered_field['#type'] = 'container';
$rendered_field['#type'] = 'html_tag';
$rendered_field['#tag'] = 'span';
}
}
Loading