views/mdc/assets/js/components/events/errors.js in voom-presenters-0.1.13 vs views/mdc/assets/js/components/events/errors.js in voom-presenters-0.2.0
- old
+ new
@@ -62,10 +62,10 @@
if (!Array.isArray(responseErrors)) {
responseErrors = [responseErrors];
}
for (var response of responseErrors) {
var pageErrors = Object.values(this.normalizeErrors(response)).reduce(function (previous, value) {
- if (Array.isArray(value)) {
+ if (Array.isArray(value) && value.length > 0) {
previous.push(value.join('<br/>'));
}
return previous;
}, []);
var fieldErrors = this.normalizeErrors(response.errors);