refactor: update to nuxt-graphql 0.5.x
This commit is contained in:
@@ -28,7 +28,7 @@ export function useAuthConnexion() {
|
||||
async function login({ data: variables }: FormSubmitEvent<AuthLoginForm>, redirect?: string) {
|
||||
try {
|
||||
const { data } = await loginMutate(variables);
|
||||
if (!data.login) {
|
||||
if (!data?.login) {
|
||||
throw new Error(`Échec de la connexion par mot de passe.`);
|
||||
}
|
||||
await redirectTo(redirect);
|
||||
|
||||
Reference in New Issue
Block a user