FIX: polls extending in post reply histories (#11837)

* Add an acceptance test

* FIX: polls extending in post reply histories
This commit is contained in:
Andrew Prigorshnev
2021-01-26 19:29:49 +04:00
committed by GitHub
parent cd3d24ed8c
commit 3bbe87f229
3 changed files with 451 additions and 255 deletions
@@ -660,8 +660,10 @@ createWidget("post-article", {
.find("post-reply-history", { postId: this.attrs.id })
.then((posts) => {
this.state.repliesAbove = posts.map((p) => {
p.shareUrl = `${topicUrl}/${p.post_number}`;
return transformWithCallbacks(p);
let result = transformWithCallbacks(p);
result.shareUrl = `${topicUrl}/${p.post_number}`;
result.asPost = this.store.createRecord("post", p);
return result;
});
});
}