FIX: Don't show the up arrow to jump to posts in different topics

This commit is contained in:
Robin Ward 2017-10-13 11:56:24 -04:00
parent b124e5f19f
commit c2a8b95e83
1 changed files with 3 additions and 2 deletions

View File

@ -159,10 +159,11 @@ export default class PostCooked {
_updateQuoteElements($aside, desc) {
let navLink = "";
const quoteTitle = I18n.t("post.follow_quote");
const postNumber = $aside.data('post');
let postNumber = $aside.data('post');
let topicNumber = $aside.data('topic');
// If we have a post reference
if (postNumber) {
if (topicNumber && topicNumber === this.attrs.topicId && postNumber) {
let icon = iconHTML('arrow-up');
navLink = `<a href='${this._urlForPostNumber(postNumber)}' title='${quoteTitle}' class='back'>${icon}</a>`;
}