diff --git a/app/assets/javascripts/discourse/lib/click_track.js b/app/assets/javascripts/discourse/lib/click_track.js index 207a8f319..a77894dfe 100644 --- a/app/assets/javascripts/discourse/lib/click_track.js +++ b/app/assets/javascripts/discourse/lib/click_track.js @@ -23,6 +23,10 @@ Discourse.ClickTrack = { topicId = $('#topic').data('topic-id'), userId = $link.data('user-id'); + if (!href || href.trim().length === 0){ + return; + } + if (!userId) userId = $article.data('user-id'); var ownLink = userId && (userId === Discourse.User.currentProp('id')),