From b4f8f924315c3543c1b20a8dbca444dab254ab37 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun <cheeaun@gmail.com> Date: Sat, 11 Mar 2023 09:13:11 +0800 Subject: [PATCH] Another bug fix --- src/utils/handle-content-links.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/handle-content-links.js b/src/utils/handle-content-links.js index 153cae15..792dbf3e 100644 --- a/src/utils/handle-content-links.js +++ b/src/utils/handle-content-links.js @@ -45,7 +45,9 @@ function handleContentLinks(opts) { } else if (states.unfurledLinks[target.href]?.url) { e.preventDefault(); e.stopPropagation(); - states.prevLocation = location; + states.prevLocation = { + pathname: location.hash.replace(/^#/, ''), + }; location.hash = `#${states.unfurledLinks[target.href].url}`; } };