From 077a44fdf9f72bb71f723cc1c6dc54fae2b5d19b Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 9 Jun 2021 14:48:35 +0200 Subject: [PATCH] LSform: fix displaying multiple errors on same field (on Ajax submit) --- src/includes/js/LSform.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/includes/js/LSform.js b/src/includes/js/LSform.js index aad26c46..19b84f3a 100644 --- a/src/includes/js/LSform.js +++ b/src/includes/js/LSform.js @@ -386,7 +386,8 @@ var LSform = new Class({ addError: function(errors,name) { var ul = $(name); if ($type(ul)) { - errors = new Array(errors); + if ($type(errors) != 'array') + errors = new Array(errors); errors.each(function(txt){ var dd = new Element('dd'); dd.addClass('LSform');