Skip to content

Commit 0e41cba

Browse files
author
Data Courier
committed
Fix upvoting
1 parent ae8e246 commit 0e41cba

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

js/TopicShow.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ class TopicShow extends Class
309309
elem.toggleClass("active").addClass("loading")
310310
User.getData (data) =>
311311
data.comment_vote ?= {}
312-
comment_uri = elem.attr("id").match("_([0-9]+_[A-Za-z0-9]+)$")[1]
312+
comment_uri = elem.attr("id").match("_([^_]+_[A-Za-z0-9]+)$")[1]
313313

314314
if elem.hasClass("active")
315315
data.comment_vote[comment_uri] = 1

js/all.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1881,7 +1881,7 @@ jQuery.extend( jQuery.easing,
18811881
if (data.comment_vote == null) {
18821882
data.comment_vote = {};
18831883
}
1884-
comment_uri = elem.attr("id").match("_([0-9]+_[A-Za-z0-9]+)$")[1];
1884+
comment_uri = elem.attr("id").match("_([^_]+_[A-Za-z0-9]+)$")[1];
18851885
if (elem.hasClass("active")) {
18861886
data.comment_vote[comment_uri] = 1;
18871887
} else {

0 commit comments

Comments
 (0)