Skip to content

Commit c7cdfb9

Browse files
committed
feat: review
1 parent 4e69d82 commit c7cdfb9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/useForm.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,8 @@ export class FormStore {
910910
const namePathList: InternalNamePath[] | undefined = provideNameList
911911
? nameList.map(getNamePath)
912912
: [];
913-
const noListNamePathList = [...namePathList];
913+
914+
const finalValueNamePathList = [...namePathList];
914915

915916
// Collect result in promise list
916917
const promiseList: Promise<FieldError>[] = [];
@@ -930,7 +931,7 @@ export class FormStore {
930931
// When Form.List has a value, filter Form.List `name`
931932
!(field.isList() && namePathList.some(name => matchNamePath(name, fieldNamePath, true)))
932933
) {
933-
noListNamePathList.push(fieldNamePath);
934+
finalValueNamePathList.push(fieldNamePath);
934935
}
935936
namePathList.push(fieldNamePath);
936937
}
@@ -1008,7 +1009,7 @@ export class FormStore {
10081009
const returnPromise: Promise<Store | ValidateErrorEntity | string[]> = summaryPromise
10091010
.then((): Promise<Store | string[]> => {
10101011
if (this.lastValidatePromise === summaryPromise) {
1011-
return Promise.resolve(this.getFieldsValue(noListNamePathList));
1012+
return Promise.resolve(this.getFieldsValue(finalValueNamePathList));
10121013
}
10131014
return Promise.reject<string[]>([]);
10141015
})

0 commit comments

Comments
 (0)