fix: error response has undefined issue (#2092)
This commit is contained in:
@@ -83,7 +83,7 @@ export const actions = {
|
|||||||
setUser(response.data.payload.data, getHeaderExpiry(response));
|
setUser(response.data.payload.data, getHeaderExpiry(response));
|
||||||
context.commit(types.default.SET_CURRENT_USER);
|
context.commit(types.default.SET_CURRENT_USER);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.response.status === 401) {
|
if (error?.response?.status === 401) {
|
||||||
clearCookiesOnLogout();
|
clearCookiesOnLogout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user