fix(catalog): serialize empty selections as an object
This commit is contained in:
@@ -52,7 +52,7 @@ class VariantSelectionService
|
||||
$attributeKeys,
|
||||
$matchingVariants->isEmpty() ? [] : $normalizedSelections,
|
||||
),
|
||||
'selected_values' => $matchingVariants->isEmpty() ? [] : $normalizedSelections,
|
||||
'selected_values' => (object) ($matchingVariants->isEmpty() ? [] : $normalizedSelections),
|
||||
'resolved_variant' => $resolvedVariant === null
|
||||
? null
|
||||
: $this->variantData($catalogItem, $resolvedVariant),
|
||||
|
||||
Reference in New Issue
Block a user