From 570b4082959cea03e42e9a0fd8bdd3efae32c611 Mon Sep 17 00:00:00 2001 From: petrkrejci1 <31248142+petrkrejci1@users.noreply.github.com> Date: Tue, 25 Jun 2019 21:10:56 +1200 Subject: [PATCH] Errors null bug When errors is null errors.length call is causing uncaught error. Fixed by adding check on errors and then calling the original errors.length. --- js/validator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/validator.js b/js/validator.js index 6311a22..ae9e708 100644 --- a/js/validator.js +++ b/js/validator.js @@ -254,7 +254,7 @@ var $block = $group.find('.help-block.with-errors') var $feedback = $group.find('.form-control-feedback') - if (!errors.length) return + if (errors) if (!errors.length) return errors = $('