Browse Source

Prevent potential issue with public/hashtag statuses arriving after

they have been loaded and favourited/reblogged from another source

Since the status JSON returned from public/hashtag streams does not
contain favourited/reblogged attributes, merging them should not
override existing ones.
closed-social-glitch-2
Eugen Rochko 7 years ago
parent
commit
17ae7d132c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/assets/javascripts/components/reducers/statuses.jsx

+ 1
- 1
app/assets/javascripts/components/reducers/statuses.jsx View File

@ -46,7 +46,7 @@ const normalizeStatus = (state, status) => {
status.reblog = status.reblog.id;
}
return state.set(status.id, Immutable.fromJS(status));
return state.update(status.id, Immutable.Map(), map => map.mergeDeep(Immutable.fromJS(status)));
};
const normalizeStatuses = (state, statuses) => {

Loading…
Cancel
Save