瀏覽代碼

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

master
Eugen Rochko 6 年之前
committed by GitHub
父節點
當前提交
11436358b4
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. +7
    -1
      app/javascript/mastodon/reducers/contexts.js

+ 7
- 1
app/javascript/mastodon/reducers/contexts.js 查看文件

@@ -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;


Loading…
取消
儲存