From c5488fe1ddf46b95aba4f81bee1b90a1c9c0f081 Mon Sep 17 00:00:00 2001 From: Gareth Redfern Date: Fri, 11 Feb 2022 21:46:09 +0000 Subject: [PATCH] add type-safe equality operator --- src/hooks/auth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/auth.js b/src/hooks/auth.js index bf13ab3..333cf7b 100644 --- a/src/hooks/auth.js +++ b/src/hooks/auth.js @@ -11,7 +11,7 @@ export const useAuth = ({ middleware, redirectIfAuthenticated } = {}) => { .get('/api/user') .then(res => res.data) .catch(error => { - if (error.response.status != 409) throw error + if (error.response.status !== 409) throw error router.push('/verify-email') }),