[Glitch] Fix accounts' display name/bio not being set from initial state

Port 6e72faaa78 to glitch-soc
lolsob-rspec
Thibaut Girka 2018-07-30 14:07:04 +02:00 committed by ThibG
parent 9a1015327b
commit a3d318ec76
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ const initialState = ImmutableMap();
export default function accounts(state = initialState, action) { export default function accounts(state = initialState, action) {
switch(action.type) { switch(action.type) {
case STORE_HYDRATE: case STORE_HYDRATE:
return state.merge(action.state.get('accounts')); return normalizeAccounts(state, Object.values(action.state.get('accounts').toJS()));
case ACCOUNT_FETCH_SUCCESS: case ACCOUNT_FETCH_SUCCESS:
case NOTIFICATIONS_UPDATE: case NOTIFICATIONS_UPDATE:
return normalizeAccount(state, action.account); return normalizeAccount(state, action.account);