From ab7e6092396365f433152e16bd3076779bac4572 Mon Sep 17 00:00:00 2001 From: A Web Artisan <57477934+thewebartisan7@users.noreply.github.com> Date: Tue, 13 Oct 2020 08:06:12 +0200 Subject: [PATCH] Fix getErrors issue when field has not error Maybe I am missing something, but if I try to get all errors for all input, sometime field has not property `errors`. Before checking `field.errors.length` I add a check if field.errors is set. Otherwise there is an error in console. --- src/pristine.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pristine.js b/src/pristine.js index 6fd296a..586ec83 100755 --- a/src/pristine.js +++ b/src/pristine.js @@ -141,7 +141,7 @@ export default function Pristine(form, config, live){ let erroneousFields = []; for(let i=0; i