chengwl 1 неделя назад
Родитель
Сommit
ca9c664bfd
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      packages/Longyi/Core/src/Type/FlexibleVariant.php

+ 4 - 0
packages/Longyi/Core/src/Type/FlexibleVariant.php

@@ -72,6 +72,10 @@ class FlexibleVariant extends AbstractType
     {
         $product = parent::update($data, $id, $attribute);
 
+        if (is_array($attribute) && $attribute !== []) {
+            return $product;
+        }
+
         if (isset($data['options']) && is_array($data['options'])) {
             $syncData = [];