Skip to content

Commit

Permalink
FIX: double click counters
Browse files Browse the repository at this point in the history
  • Loading branch information
ZogStriP committed Feb 18, 2016
1 parent 3b9223c commit 8a1a9f6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/assets/javascripts/discourse/views/post.js.es6
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,12 @@ const PostView = Discourse.GroupedView.extend(Ember.Evented, {
const $link = $(this),
href = $link.attr('href');

let valid = !lc.internal && href === lc.url;
let valid = href === lc.url;

// this might be an attachment
if (lc.internal) { valid = href.indexOf(lc.url) >= 0; }
if (lc.internal && /^\/uploads\//.test(lc.url)) {
valid = href.indexOf(lc.url) >= 0;
}

if (valid) {
// don't display badge counts on category badge & oneboxes (unless when explicitely stated)
Expand Down

0 comments on commit 8a1a9f6

Please sign in to comment.