From 6e6dd4cb0b396ae7ec4f273bccd254bc0f9885d5 Mon Sep 17 00:00:00 2001 From: Jacky Zhao Date: Tue, 3 May 2022 10:57:20 -0400 Subject: [PATCH] fix: trim trailing slash when calculating popover --- assets/js/popover.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/popover.js b/assets/js/popover.js index a4b6852..ee0477e 100644 --- a/assets/js/popover.js +++ b/assets/js/popover.js @@ -13,7 +13,7 @@ function initPopover(baseURL) { links .filter(li => li.dataset.src) .forEach(li => { - const linkDest = content[li.dataset.src.replace(basePath, "")] + const linkDest = content[li.dataset.src.replace(/\/$/g, "").replace(basePath, "")] if (linkDest) { const popoverElement = `

${linkDest.title}