diff --git a/src/frontend/src/controllers/API/index.ts b/src/frontend/src/controllers/API/index.ts index bdf7e5221..66294ce8a 100644 --- a/src/frontend/src/controllers/API/index.ts +++ b/src/frontend/src/controllers/API/index.ts @@ -393,7 +393,9 @@ export async function autoLogin() { export async function renewAccessToken(token: string) { try { - return await api.post(`${BASE_URL_API}refresh?token=${token}`); + if (token) { + return await api.post(`${BASE_URL_API}refresh?token=${token}`); + } } catch (error) { console.log("Error:", error); throw error;