mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +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) {
|
||||
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;
|
||||
const tooltip = await app.parseAndTranslate('partials/topic/post-preview', { post: postData });
|
||||
tooltip.hide().find('.timeago').timeago();
|
||||
|
||||
Reference in New Issue
Block a user