1
0
Fork 0
forked from fedi/mastodon

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.
This commit is contained in:
Eugen Rochko 2017-02-02 00:45:57 +01:00
parent ede04cdb24
commit 17ae7d132c

View file

@ -46,7 +46,7 @@ const normalizeStatus = (state, status) => {
status.reblog = status.reblog.id; 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) => { const normalizeStatuses = (state, statuses) => {