Skip to content

Commit 13d1d97

Browse files
committed
Fixes: Object entries is not a function in older browsers
1 parent 82015b2 commit 13d1d97

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/use-form.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ export default function useNewForm(fieldConfig) {
184184
);
185185
setFormErrors(() => {
186186
const errorWithoutMsg = {};
187-
Object.entries(errorFields).forEach(([fieldName, errorState]) => {
187+
Object.keys(errorFields).forEach((fieldName) => {
188+
const errorState = errorFields[fieldName];
188189
errorWithoutMsg[fieldName] = {
189190
isValid: errorState.isValid,
190191
};

0 commit comments

Comments
 (0)