mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-21 12:05:07 +01:00
parent
0e0a9e716c
commit
11436358b4
@ -34,7 +34,13 @@ const deleteFromContexts = (state, id) => {
|
|||||||
const updateContext = (state, status, references) => {
|
const updateContext = (state, status, references) => {
|
||||||
return state.update('descendants', map => {
|
return state.update('descendants', map => {
|
||||||
references.forEach(parentId => {
|
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;
|
return map;
|
||||||
|
Loading…
Reference in New Issue
Block a user