FIX: Jump to reply button in post stream was not working (#14123)

This commit is contained in:
Osama Sayegh 2021-08-31 08:18:45 +03:00 committed by GitHub
parent c2f87e0a36
commit 45a166b6ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View File

@ -499,7 +499,16 @@ createWidget("post-contents", {
.then((posts) => {
this.state.repliesBelow = posts.map((p) => {
let result = transformWithCallbacks(p);
result.shareUrl = `${topicUrl}/${p.post_number}`;
// these would conflict with computed properties with identical names
// in the post model if we kept them.
delete result.new_user;
delete result.deleted;
delete result.shareUrl;
delete result.firstPost;
delete result.usernameUrl;
result.customShare = `${topicUrl}/${p.post_number}`;
result.asPost = this.store.createRecord("post", result);
return result;
});