From 8a1a9f60a2df30661b842142200b2449bd2801ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Thu, 18 Feb 2016 18:42:10 +0100 Subject: [PATCH] FIX: double click counters --- app/assets/javascripts/discourse/views/post.js.es6 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/views/post.js.es6 b/app/assets/javascripts/discourse/views/post.js.es6 index 21535c72d50..8dd08a5b612 100644 --- a/app/assets/javascripts/discourse/views/post.js.es6 +++ b/app/assets/javascripts/discourse/views/post.js.es6 @@ -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)