Skip to content
Snippets Groups Projects

Issue #3409205: Broken swatch display in widget when not providing swatches

1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -50,7 +50,7 @@ class ColorisWidget extends Textfield {
$focus_input = isset($element['#focus_input']) && $element['#focus_input'] == FALSE ? 'false' : 'true';
$clear_button_show = isset($element['#clear_button_show']) && $element['#clear_button_show'] == TRUE ? 'true' : 'false';
$clear_button_label = $element['#clear_button_label'] ?? t('Clear');
$swatches = $element['#swatches'] ?? [];
$swatches = array_filter($element['#swatches'] ?? []);
$inline = isset($element['#inline']) && $element['#inline'] == TRUE ? 'true' : 'false';
$element = [
'#prefix' => '<div class="coloris-wrapper">',
Loading