🐛 fix(api.tsx): handle null values when calling login function to prevent potential errors
This commit is contained in:
parent
c64594c0a8
commit
c06cfce385
1 changed files with 1 additions and 1 deletions
|
|
@ -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"];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue