Browse Source

Fix handling of recursive toots in WebUI (#17041)

closed-social-v3
Claire 3 years ago
committed by Eugen Rochko
parent
commit
5e4b04de88
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      app/javascript/mastodon/features/status/index.js

+ 3
- 3
app/javascript/mastodon/features/status/index.js View File

@ -83,7 +83,7 @@ const makeMapStateToProps = () => {
ancestorsIds = ancestorsIds.withMutations(mutable => {
let id = statusId;
while (id) {
while (id && !mutable.includes(id)) {
mutable.unshift(id);
id = inReplyTos.get(id);
}
@ -101,7 +101,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) {
@ -110,7 +110,7 @@ const makeMapStateToProps = () => {
if (replies) {
replies.reverse().forEach(reply => {
ids.unshift(reply);
if (!ids.includes(reply) && !descendantsIds.includes(reply) && statusId !== reply) ids.push(reply);
});
}
}

Loading…
Cancel
Save