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; }