Skip to content

Commit

Permalink
feat: show default error message on empty errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nahu committed Jul 10, 2024
1 parent 7b6419c commit 24a51bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pages/auth/CreateAccountPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export function CreateAccountPage() {
}
});

if (!errorData?.errors) {
if (!errorData?.errors || errorData?.errors.length === 0) {
enqueueSnackbar(t('errorCodes:generic'), {
variant: 'error',
});
Expand Down
2 changes: 1 addition & 1 deletion src/pages/auth/SignInPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export function SignInPage() {
});
});

if (!errorData?.errors) {
if (!errorData?.errors || errorData?.errors.length === 0) {
enqueueSnackbar(t('errorCodes:generic'), {
variant: 'error',
});
Expand Down

0 comments on commit 24a51bc

Please sign in to comment.