diff --git a/app/assets/javascripts/discourse/lib/transform-post.js.es6 b/app/assets/javascripts/discourse/lib/transform-post.js.es6
index c65bdf21b..b3379004e 100644
--- a/app/assets/javascripts/discourse/lib/transform-post.js.es6
+++ b/app/assets/javascripts/discourse/lib/transform-post.js.es6
@@ -85,7 +85,6 @@ 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;
@@ -105,6 +104,7 @@ export default function transformPost(currentUser, site, post, prevPost, nextPos
   postAtts.actionCode = post.action_code;
   postAtts.actionCodeWho = post.action_code_who;
   postAtts.userCustomFields = post.user_custom_fields;
+  postAtts.topicUrl = topic.get('url');
 
   const showPMMap = topic.archetype === 'private_message' && post.post_number === 1;
   if (showPMMap) {
@@ -118,7 +118,6 @@ export default function transformPost(currentUser, site, post, prevPost, nextPos
   const showTopicMap = showPMMap || (post.post_number === 1 && topic.archetype === 'regular' && topic.posts_count > 1);
   if (showTopicMap) {
     postAtts.showTopicMap = true;
-    postAtts.topicUrl = topic.get('url');
     postAtts.topicCreatedAt = topic.created_at;
     postAtts.createdByUsername = details.created_by.username;
     postAtts.createdByAvatarTemplate = details.created_by.avatar_template;
diff --git a/app/assets/javascripts/discourse/widgets/post-cooked.js.es6 b/app/assets/javascripts/discourse/widgets/post-cooked.js.es6
index b8d5cd06f..f98a90eb1 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.attrs.topic.get('url')}/${postNumber}` : this.attrs.topic.get('url');
+    return (postNumber > 0) ? `${this.attrs.topicUrl}/${postNumber}` : this.attrs.topicUrl;
   }
 
   _updateQuoteElements($aside, desc) {