diff options
author | Claire <claire.github-309c@sitedethib.com> | 2021-11-26 01:12:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-26 01:12:09 +0100 |
commit | b4f785c1f46693c4e42b035e6728f99aac1b85db (patch) | |
tree | e904eeb81cc2a1cd99dc11d8fbe0ed0e9d766d59 /app/javascript/flavours | |
parent | 8c2fe2a846dd14914f7faa4bf71be21058249a93 (diff) | |
parent | 5f10e64330635bfd609ba5acdd78fa505c12f5b1 (diff) |
Merge pull request #1636 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours')
-rw-r--r-- | app/javascript/flavours/glitch/features/status/index.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/javascript/flavours/glitch/features/status/index.js b/app/javascript/flavours/glitch/features/status/index.js index bddf1a2ef..12ea407ad 100644 --- a/app/javascript/flavours/glitch/features/status/index.js +++ b/app/javascript/flavours/glitch/features/status/index.js @@ -70,7 +70,7 @@ const makeMapStateToProps = () => { ancestorsIds = ancestorsIds.withMutations(mutable => { let id = statusId; - while (id) { + while (id && !mutable.includes(id)) { mutable.unshift(id); id = inReplyTos.get(id); } @@ -88,7 +88,7 @@ const makeMapStateToProps = () => { const ids = [statusId]; while (ids.length > 0) { - let id = ids.shift(); + let id = ids.pop(); const replies = contextReplies.get(id); if (statusId !== id) { @@ -97,7 +97,7 @@ const makeMapStateToProps = () => { if (replies) { replies.reverse().forEach(reply => { - ids.unshift(reply); + if (!ids.includes(reply) && !descendantsIds.includes(reply) && statusId !== reply) ids.push(reply); }); } } |