From 7b61d319b1ff010f4d90e9e515881c04c7fc04d7 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 9 Jul 2021 14:58:49 -0500 Subject: [PATCH] Auth: clear `me` when ME_FETCH_SKIP is dispatched --- app/soapbox/reducers/auth.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/soapbox/reducers/auth.js b/app/soapbox/reducers/auth.js index 5985939da..d1338c179 100644 --- a/app/soapbox/reducers/auth.js +++ b/app/soapbox/reducers/auth.js @@ -7,6 +7,7 @@ import { VERIFY_CREDENTIALS_SUCCESS, VERIFY_CREDENTIALS_FAIL, } from '../actions/auth'; +import { ME_FETCH_SKIP } from '../actions/me'; import { Map as ImmutableMap, fromJS } from 'immutable'; const defaultState = ImmutableMap({ @@ -158,6 +159,8 @@ const reducer = (state, action) => { return action.error.response.status === 403 ? deleteToken(state, action.token) : state; case SWITCH_ACCOUNT: return state.set('me', action.accountId); + case ME_FETCH_SKIP: + return state.set('me', null); default: return state; }