From 7f5d83887834a8ec2228dea7c78a3f13ff74f0a4 Mon Sep 17 00:00:00 2001 From: DCloud_LXH <283700113@qq.com> Date: Wed, 22 Jun 2022 17:58:46 +0800 Subject: [PATCH] chore: createSidebar --- docs/.vuepress/markdown/createSidebar.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/docs/.vuepress/markdown/createSidebar.js b/docs/.vuepress/markdown/createSidebar.js index b1b36ea17..1edbdd54b 100644 --- a/docs/.vuepress/markdown/createSidebar.js +++ b/docs/.vuepress/markdown/createSidebar.js @@ -25,14 +25,7 @@ function parseBar(file, options) { text = text || child.content break; case 'link_open': - const len = child.attrs.length - for (let index = 0; index < len; index++) { - const attr = child.attrs[index]; - if (attr[0] === 'href') { - link = link || attr[1] - break; - } - } + link = link || new Map(child.attrs).get('href') break; case 'code_inline': try { -- GitLab