From 6861321384b0fec33a5dcd5ceb17fb88c4b2894a Mon Sep 17 00:00:00 2001 From: guridaek Date: Tue, 19 Sep 2023 21:58:02 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20checkLoginToken=EC=97=90=20clearTimeout?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/hooks/useLogin.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/hooks/useLogin.ts b/frontend/src/hooks/useLogin.ts index 3e0d33532..35b3611cc 100644 --- a/frontend/src/hooks/useLogin.ts +++ b/frontend/src/hooks/useLogin.ts @@ -51,7 +51,8 @@ export const useLogin = () => { const checkLoginToken = async () => { const token = getAccessToken(); - if (timer.current) return; + if (timer.current) clearTimeout(timer.current); + if (!token || !isLogin) return; const exp = getExpiration(token);