summaryrefslogtreecommitdiff
path: root/js/Article.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-04-07 06:50:24 +0300
committerAndrew Dolgov <[email protected]>2020-04-07 06:50:24 +0300
commitafaac95d8d3891614b312cd1eb7e992a53cd2b5f (patch)
tree682deb85caa33e764e6c0a5dd1d8c3ac4ba0048d /js/Article.js
parent44b1f0fcc0a0497b8fa0895b8655f4f1b9396ace (diff)
if comment URL is not specified but comment count is non-zero, show comments prompt leading to the article
Diffstat (limited to 'js/Article.js')
-rw-r--r--js/Article.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/Article.js b/js/Article.js
index 50447c2a1..b9f35c706 100644
--- a/js/Article.js
+++ b/js/Article.js
@@ -149,14 +149,14 @@ define(["dojo/_base/declare"], function (declare) {
formatComments: function(hl) {
let comments = "";
- if (hl.comments) {
+ if (hl.comments || hl.num_comments > 0) {
let comments_msg = __("comments");
if (hl.num_comments > 0) {
comments_msg = hl.num_comments + " " + ngettext("comment", "comments", hl.num_comments)
}
- comments = `<a href="${escapeHtml(hl.comments)}">(${comments_msg})</a>`;
+ comments = `<a href="${escapeHtml(hl.comments ? hl.comments : hl.link)}">(${comments_msg})</a>`;
}
return comments;