Skip to content

Commit 04abc4f

Browse files
committed
Render nothing for empty swatches as in swatches component itself
1 parent c1c2392 commit 04abc4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/uui-color-picker/lib/uui-color-picker.element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ export class UUIColorPickerElement extends LabelMixin('label', LitElement) {
530530
}
531531

532532
private _renderSwatches() {
533-
if (!this.swatches) return nothing;
533+
if (!this.swatches || this.swatches.length === 0) return nothing;
534534
return html`<uui-color-swatches
535535
id="swatches"
536536
class="color-picker__swatches"

0 commit comments

Comments
 (0)