Skip to content

Commit b56c797

Browse files
committed
Fix bug: Show activity counts when either views or stars are retrieved
1 parent c5f472f commit b56c797

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

js/custom.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,12 +402,12 @@ function setTableMessages(msgType, msgYear) {
402402
actViewCount = v.actNumber;
403403
});
404404
}
405-
if (actStarCount > -1 && actViewCount > -1) {
405+
if (actStarCount > -1 || actViewCount > -1) {
406406
var divStats = $("<div>", { 'class': 'stats-box' });
407407
var pStars = $("<p>", {});
408408
var pViews = $("<p>", {});
409-
pStars.text('\u2605\u00a0' + actStarCount);
410-
pViews.text('\u00a0' + actViewCount);
409+
pStars.text('\u2605\u00a0' + (actStarCount > -1 ? actStarCount : 0));
410+
pViews.text('\u00a0' + (actViewCount > -1 ? actViewCount : 0));
411411
pViews.prepend($("<img>", { 'src': 'assets/eye.svg' }));
412412
divStats.append(pStars, pViews);
413413
tdStats.append(divStats);

0 commit comments

Comments
 (0)