aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-10-22 00:06:19 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-10-22 00:06:19 +0800
commit5afa841fa06a095d63a435c8606d1ccd34b55ec7 (patch)
tree57d3711973d7ec2a2b561fbd0ff283e09f73adac
parente774e551b50af7dfa320adb5e9b5cc7f790f0e52 (diff)
fix: syntax erorr about selector of DocLink
-rw-r--r--src/dumbyUtils.mjs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dumbyUtils.mjs b/src/dumbyUtils.mjs
index 0430f97..409fe93 100644
--- a/src/dumbyUtils.mjs
+++ b/src/dumbyUtils.mjs
@@ -220,7 +220,7 @@ export const createGeoLink = (link) => {
220 */ 220 */
221export const createDocLink = link => { 221export const createDocLink = link => {
222 const label = decodeURIComponent(link.href.split('#')[1]) 222 const label = decodeURIComponent(link.href.split('#')[1])
223 const selector = link.title.split('=>')[1] ?? label ? '#' + label : null 223 const selector = link.title.split('=>')[1] ?? (label ? '#' + label : null)
224 if (!selector) return false 224 if (!selector) return false
225 225
226 link.classList.add('with-leader-line', 'doclink') 226 link.classList.add('with-leader-line', 'doclink')