From c06cfce385d4df1495079e1d7f4232678468f4a6 Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Wed, 30 Aug 2023 19:02:52 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(api.tsx):=20handle=20null=20?= =?UTF-8?q?values=20when=20calling=20login=20function=20to=20prevent=20pot?= =?UTF-8?q?ential=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/src/controllers/API/api.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/controllers/API/api.tsx b/src/frontend/src/controllers/API/api.tsx index 59fba4393..4c444ff37 100644 --- a/src/frontend/src/controllers/API/api.tsx +++ b/src/frontend/src/controllers/API/api.tsx @@ -33,7 +33,7 @@ function ApiInterceptor() { } const res = await renewAccessToken(refreshToken); - login(res.data.access_token, res.data.refresh_token); + login(res?.data?.access_token, res?.data?.refresh_token); try { if (error?.config?.headers) { delete error.config.headers["Authorization"];