1
0
mirror of https://github.com/mastodon/mastodon synced 2024-11-28 06:48:28 +09:00

Fix regression from #5206 - deduplicate descendants (#5253)

This commit is contained in:
Eugen Rochko 2017-10-07 12:16:39 +02:00 committed by GitHub
parent 0e0a9e716c
commit 11436358b4

View File

@ -34,7 +34,13 @@ const deleteFromContexts = (state, id) => {
const updateContext = (state, status, references) => {
return state.update('descendants', map => {
references.forEach(parentId => {
map = map.update(parentId, ImmutableList(), list => list.push(status.id));
map = map.update(parentId, ImmutableList(), list => {
if (list.includes(status.id)) {
return list;
}
return list.push(status.id);
});
});
return map;