fix: error response has undefined issue (#2092)

This commit is contained in:
Muhsin Keloth
2021-04-13 18:21:46 +05:30
committed by GitHub
parent c4ae901591
commit 2bb2d4aa25

View File

@@ -83,7 +83,7 @@ export const actions = {
setUser(response.data.payload.data, getHeaderExpiry(response));
context.commit(types.default.SET_CURRENT_USER);
} catch (error) {
if (error.response.status === 401) {
if (error?.response?.status === 401) {
clearCookiesOnLogout();
}
}