diff --git a/inc/compilePostComments.js b/inc/compilePostComments.js index 0fecde6..b5157ca 100644 --- a/inc/compilePostComments.js +++ b/inc/compilePostComments.js @@ -1,5 +1,5 @@ module.exports = function() { - this.compilePostCommentsHtml = (comments, next_comment, post_id, post_url, morechildren_ids, post_author, viewing_comment, user_preferences, last_known_depth) => { + this.compilePostCommentsHtml = (comments, next_comment, post_id, post_url, morechildren_ids, post_author, viewing_comment, user_preferences, last_known_depth, req_url) => { return new Promise((resolve, reject) => { (async () => { let comments_html @@ -115,6 +115,9 @@ module.exports = function() { } } else { let link = comments.parent_id.split('_')[1] + if (req_url.slice(-1) === '/') { + link = '../' + link + } comments_html = `