diff --git a/src/fields/ColourSwatches.php b/src/fields/ColourSwatches.php index 3576666..1add104 100644 --- a/src/fields/ColourSwatches.php +++ b/src/fields/ColourSwatches.php @@ -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'] ?? ''; } }