From 58c7a0f5808e425e0fb6338b05ecc10468f0a45c Mon Sep 17 00:00:00 2001 From: ncoronel Date: Fri, 14 Aug 2026 10:15:39 -0300 Subject: [PATCH] fix(catalog): serialize empty selections as an object --- app/Domains/Catalog/Services/VariantSelectionService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Domains/Catalog/Services/VariantSelectionService.php b/app/Domains/Catalog/Services/VariantSelectionService.php index c2f22c6..7f6e0fd 100644 --- a/app/Domains/Catalog/Services/VariantSelectionService.php +++ b/app/Domains/Catalog/Services/VariantSelectionService.php @@ -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),