Skip to content

Commit

Permalink
fix: Color with null
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-to committed Nov 7, 2024
1 parent 7b2f173 commit 1fdef8a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/UI/src/Fields/Color.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ class Color extends Field implements HasDefaultValueContract, CanBeString

protected function resolvePreview(): Renderable|string
{
if(is_null($this->getValue())) {
return '';
}

return ColorComponent::make($this->getValue())
->render();
}
Expand Down

0 comments on commit 1fdef8a

Please sign in to comment.