mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-25 16:59:17 +01:00
show string errors
This commit is contained in:
parent
66bdf442d6
commit
c29b53cdd6
@ -12,7 +12,9 @@ export class ValidationService {
|
||||
const defaultErrorMessage = this.i18nService.t('unexpectedError');
|
||||
const errors: string[] = [];
|
||||
|
||||
if (data == null || typeof data !== 'object') {
|
||||
if (data != null && typeof data === 'string') {
|
||||
errors.push(data);
|
||||
} else if (data == null || typeof data !== 'object') {
|
||||
errors.push(defaultErrorMessage);
|
||||
} else if (data.validationErrors == null) {
|
||||
errors.push(data.message ? data.message : defaultErrorMessage);
|
||||
|
Loading…
Reference in New Issue
Block a user