diff --git a/app/soapbox/reducers/meta.js b/app/soapbox/reducers/meta.js
index 0e784fe30..f32283eca 100644
--- a/app/soapbox/reducers/meta.js
+++ b/app/soapbox/reducers/meta.js
@@ -5,17 +5,20 @@ import { Map as ImmutableMap, fromJS } from 'immutable';
const initialState = ImmutableMap();
+const importAccount = (state, account) => {
+ return state.withMutations(state => {
+ if (account.has('pleroma')) {
+ const pleroPrefs = account.get('pleroma').delete('settings_store');
+ state.mergeIn(['pleroma'], pleroPrefs);
+ }
+ });
+};
+
export default function meta(state = initialState, action) {
switch(action.type) {
case ME_FETCH_SUCCESS:
case ME_PATCH_SUCCESS:
- const me = fromJS(action.me);
- return state.withMutations(state => {
- if (me.has('pleroma')) {
- const pleroPrefs = me.get('pleroma').delete('settings_store');
- state.mergeIn(['pleroma'], pleroPrefs);
- }
- });
+ return importAccount(state, fromJS(action.me));
default:
return state;
}