From 41c7612b47bee707750baa588a1e11d9cc43203c Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 25 Mar 2021 23:03:58 -0500 Subject: [PATCH] Don't refresh when '_legacy' changes --- app/soapbox/reducers/auth.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/soapbox/reducers/auth.js b/app/soapbox/reducers/auth.js index 18d7d1219..c3cf164ab 100644 --- a/app/soapbox/reducers/auth.js +++ b/app/soapbox/reducers/auth.js @@ -143,10 +143,14 @@ const reload = state => { } }; +// `me` is a user ID string +const validMe = state => { + const me = state.get('me'); + return typeof me === 'string' && me !== '_legacy'; +}; + // `me` has changed from one valid ID to another const userSwitched = (oldState, state) => { - const validMe = state => typeof state.get('me') === 'string'; - const stillValid = validMe(oldState) && validMe(state); const didChange = oldState.get('me') !== state.get('me');