diff --git a/app/assets/javascripts/discourse/lib/transform-post.js.es6 b/app/assets/javascripts/discourse/lib/transform-post.js.es6 index 5eed4be23b8..c65bdf21bb2 100644 --- a/app/assets/javascripts/discourse/lib/transform-post.js.es6 +++ b/app/assets/javascripts/discourse/lib/transform-post.js.es6 @@ -85,6 +85,7 @@ export default function transformPost(currentUser, site, post, prevPost, nextPos const postAtts = transformBasicPost(post); + postAtts.topic = topic; postAtts.topicId = topic.id; postAtts.topicOwner = details.created_by.id === post.user_id; postAtts.post_type = postType; diff --git a/app/assets/javascripts/discourse/widgets/post-cooked.js.es6 b/app/assets/javascripts/discourse/widgets/post-cooked.js.es6 index 1847ca4710e..b8d5cd06f95 100644 --- a/app/assets/javascripts/discourse/widgets/post-cooked.js.es6 +++ b/app/assets/javascripts/discourse/widgets/post-cooked.js.es6 @@ -145,7 +145,7 @@ export default class PostCooked { } _urlForPostNumber(postNumber) { - return (postNumber > 0) ? `${this.topicUrl}/${postNumber}` : this.topicUrl; + return (postNumber > 0) ? `${this.attrs.topic.get('url')}/${postNumber}` : this.attrs.topic.get('url'); } _updateQuoteElements($aside, desc) {