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