Skip to content
Snippets Groups Projects
Unverified Commit b1fd6d44 authored by Claire's avatar Claire Committed by GitHub
Browse files

Fix handling of recursive toots in WebUI (#17041)

parent 013bee6a
No related branches found
No related tags found
No related merge requests found
......@@ -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);
});
}
}
......
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