Skip to content
Snippets Groups Projects
Commit 11436358 authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

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

parent 0e0a9e71
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment