Skip to content

Node.js based forum software built for the modern web

closes #6349

Barış Soner Uşaklı221f9848d204
diff --git a/public/src/client/topic/votes.js b/public/src/client/topic/votes.js
index 007fa5e6dd..ee4813d173 100644
--- a/public/src/client/topic/votes.js
+++ b/public/src/client/topic/votes.js
@@ -62,7 +62,7 @@ define('forum/topic/votes', ['components', 'translator', 'benchpress'], function
Votes.toggleVote = function (button, className, method) {
- var post = button.parents('[data-pid]');
+ var post = button.closest('[data-pid]');
var currentState = post.find(className).length;
socket.emit(currentState ? 'posts.unvote' : method, {