Skip to content

Commit 40fb464

Browse files
author
Vitaliy Parkhomenko
committed
fix(remove): submit errors are not removed on "fields.remove" call
1 parent 6089f0c commit 40fb464

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/remove.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const remove: Mutator<any> = (
3030

3131
// delete any submitErrors for this array item
3232
// if root key of array item and has submitErrors
33-
if (!tokens[2]) {
33+
if (key === `${name}[${index}]`) {
3434
// do it only for removable index
3535
// Can array be in root?
3636
// formState.submitErrors[]

0 commit comments

Comments
 (0)