From a5820b1ef3ea05aa10fbdc1bfc5f0324591ce1c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 20 Sep 2018 17:29:10 -0400 Subject: [PATCH] closes https://github.com/NodeBB/NodeBB/issues/6724 --- lib/persona.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/persona.js b/lib/persona.js index 71155ee..80b57a1 100644 --- a/lib/persona.js +++ b/lib/persona.js @@ -301,12 +301,12 @@ $(document).ready(function() { } function generateUserCard(ev) { - var avatar = $(this), - index = avatar.parents('[data-index]').attr('data-index'), - data = (ajaxify.data.topics || ajaxify.data.posts); + var avatar = $(this); + var uid = avatar.parents('[data-uid]').attr('data-uid'); + var data = (ajaxify.data.topics || ajaxify.data.posts); for (var i = 0, ii = data.length; i < ii; i++) { - if (parseInt(data[i].index, 10) === parseInt(index, 10)) { + if (parseInt(data[i].uid, 10) === parseInt(uid, 10)) { data = data[i].user; break; }