Fix Mastodon startup issues

This commit is contained in:
Alex Gleason 2020-04-23 11:42:56 -05:00
parent d151ac9b35
commit 85a68e0715
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
3 changed files with 6 additions and 4 deletions

View file

@ -64,7 +64,6 @@ export function fetchMeFail(error) {
return {
type: ME_FETCH_FAIL,
error,
skipAlert: true,
};
};

View file

@ -15,7 +15,7 @@ const initialState = ImmutableMap({
export default function instance(state = initialState, action) {
switch(action.type) {
case INSTANCE_IMPORT:
return ImmutableMap(fromJS(action.instance));
return initialState.merge(fromJS(action.instance));
default:
return state;
}

View file

@ -12,8 +12,11 @@ export default function meta(state = initialState, action) {
return state.merge(action.state.get('meta'));
case ME_FETCH_SUCCESS:
const me = fromJS(action.me);
const pleroPrefs = me.get('pleroma').delete('settings_store');
return state.mergeIn(['pleroma'], pleroPrefs);
if (me.has('pleroma')) {
const pleroPrefs = me.get('pleroma').delete('settings_store');
return state.mergeIn(['pleroma'], pleroPrefs);
}
return state;
default:
return state;
}