diff --git a/docs/.vuepress/markdown/createSidebar.js b/docs/.vuepress/markdown/createSidebar.js index b1b36ea1753b19f662067fa9ceea3a150856c32a..1edbdd54b5b2350189bc1dd94de1d5bc9fd4a9ae 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 {