mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +01:00
fix: only render preview on topic page
This commit is contained in:
@@ -190,7 +190,8 @@ define('forum/topic', [
|
|||||||
|
|
||||||
async function renderPost(pid) {
|
async function renderPost(pid) {
|
||||||
const postData = postCache[pid] || await socket.emit('posts.getPostSummaryByPid', { pid: pid });
|
const postData = postCache[pid] || await socket.emit('posts.getPostSummaryByPid', { pid: pid });
|
||||||
if (postData) {
|
$('#post-tooltip').remove();
|
||||||
|
if (postData && ajaxify.data.template.topic) {
|
||||||
postCache[pid] = postData;
|
postCache[pid] = postData;
|
||||||
const tooltip = await app.parseAndTranslate('partials/topic/post-preview', { post: postData });
|
const tooltip = await app.parseAndTranslate('partials/topic/post-preview', { post: postData });
|
||||||
tooltip.hide().find('.timeago').timeago();
|
tooltip.hide().find('.timeago').timeago();
|
||||||
|
|||||||
Reference in New Issue
Block a user