Skip to content

Commit

Permalink
chore: provide a fallback when class isn't provided
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefanie Gevaert committed Jun 2, 2022
1 parent e92c61f commit 354f082
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fields/ColourSwatches.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function serializeValue(mixed $value, ?ElementInterface $element = null):
if ($value && ($palette["label"] === $value['label'])) {
$saveValue = $value;
$saveValue['color'] = $palette['color'];
$saveValue['class'] = $palette['class'];
$saveValue['class'] = $palette['class'] ?? '';
}
}

Expand Down

0 comments on commit 354f082

Please sign in to comment.