Explorar o código

fix: 空数组覆盖有效数组 (#2687)

oooplz %!s(int64=2) %!d(string=hai) anos
pai
achega
401fcaf325
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/components/Form/src/hooks/useFormEvents.ts

+ 1 - 1
src/components/Form/src/hooks/useFormEvents.ts

@@ -43,7 +43,7 @@ function tryConstructArray(field: string, values: Recordable = {}): any[] | unde
         set(result, index, values[k.trim()]);
       });
 
-      return result.length ? result : undefined;
+      return result.filter(Boolean).length ? result : undefined;
     }
   }
 }