diff options
author | Hugues Peccatte <hugues.peccatte@gmail.com> | 2014-06-19 23:42:59 +0400 |
---|---|---|
committer | Hugues Peccatte <hugues.peccatte@gmail.com> | 2014-06-19 23:42:59 +0400 |
commit | 40def1a7a2057450fbfda42eaab4b72296845765 (patch) | |
tree | 0f89ae584886a8219d22355e6932d871d211601d /js/config.js | |
parent | ee412e6cdb2579f42381324e14aa8a294ce170d1 (diff) |
Fix 'function declaration in loop' scrutinizer errors.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
Diffstat (limited to 'js/config.js')
-rw-r--r-- | js/config.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/js/config.js b/js/config.js index 6c7e7bb5e1..d6afdf1ab0 100644 --- a/js/config.js +++ b/js/config.js @@ -331,6 +331,10 @@ function getFieldValidators(field_id, onKeyUpOnly) */ function displayErrors(error_list) { + var tempIsEmpty = function (item) { + return item !== ''; + }; + for (var field_id in error_list) { var errors = error_list[field_id]; var field = $('#' + field_id); @@ -343,9 +347,7 @@ function displayErrors(error_list) } // remove empty errors (used to clear error list) - errors = $.grep(errors, function (item) { - return item !== ''; - }); + errors = $.grep(errors, tempIsEmpty); // CSS error class if (!isFieldset) { |