1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-08 09:43:42 +01:00

fix bug for iterating validationErrors

This commit is contained in:
Kyle Spearrin 2017-12-11 12:04:18 -05:00
parent 4bcc1653ac
commit fd35529f38

View File

@ -13,11 +13,15 @@ export class ValidationService {
} else if (!data.validationErrors) {
errors.push(data.message ? data.message : defaultErrorMessage);
} else {
data.validationErrors.forEach((error: any) => {
error.forEach((item: string) => {
for (const key in data.validationErrors) {
if (!data.validationErrors.hasOwnProperty(key)) {
continue;
}
data.validationErrors[key].forEach((item: string) => {
errors.push(item);
});
});
}
}
if (errors.length) {