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:
parent
4bcc1653ac
commit
fd35529f38
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user