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

This commit is contained in:
oooplz
2023-04-06 22:01:25 +08:00
committed by GitHub
parent 5e8ef2f64f
commit 401fcaf325

View File

@@ -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;
}
}
}