Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Commit 939ddd7

Browse files
authored
Merge pull request #837 from netbek/bugfix-asynckeys-indexof
Check if async keys is array before searching for error key #818
2 parents 2007159 + 2cdc46c commit 939ddd7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/form/is-valid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function isValid(formState, options = { async: true }) {
1818
// current error key is an async validator key,
1919
// treat key as valid
2020
if (!options.async
21-
&& formState.asyncKeys
21+
&& Array.isArray(formState.asyncKeys)
2222
&& !!~formState.asyncKeys.indexOf(errorKey)) {
2323
return true;
2424
}

0 commit comments

Comments
 (0)