From c9c1bc13b7f8f0df87d6f8cc9812f53d03e6c839 Mon Sep 17 00:00:00 2001 From: jemikanegara Date: Fri, 6 Dec 2024 20:46:10 +0800 Subject: [PATCH] fix --- replaceLinks.js | 1 + 1 file changed, 1 insertion(+) diff --git a/replaceLinks.js b/replaceLinks.js index 1af8ccb..394cc71 100644 --- a/replaceLinks.js +++ b/replaceLinks.js @@ -11,6 +11,7 @@ function replaceLinks(window, {langParam, lang, translationMode, prefix, sourceO for (let i = 0; i < anchors.length; i++) { let anchor = anchors[i]; + if (!anchor.href) continue; const anchorUrlObj = new URL(anchor.href); if (prefix) { anchorUrlObj.pathname = getUnprefixedPathname(window, prefix, anchorUrlObj.pathname);