2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 09:10:25 +08:00

FIX: Update links regardless of trailing slashes

This commit is contained in:
Robin Ward 2014-03-20 15:33:56 -04:00
parent a4daafa026
commit fa3e9144e2

View file

@ -28,7 +28,7 @@
var byUrl = result.counts; var byUrl = result.counts;
for (var i=0; i<links.length; i++) { for (var i=0; i<links.length; i++) {
var link = links[i], var link = links[i],
linkCount = byUrl[link]; linkCount = byUrl[link] || byUrl[link.replace(/\/#/, '#')];
if (linkCount) { if (linkCount) {
var t = document.createTextNode(" (" + linkCount + ")"); var t = document.createTextNode(" (" + linkCount + ")");