diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 37b6f32cf..86ad48f6b 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -27,5 +27,5 @@ - [Embed Files](embed-files.md) - [UI Kit](ui-kit.md) -- [Awesome docsify](awesome.md) -- [Changelog](changelog.md) +* [Awesome docsify](awesome.md) +* [Changelog](changelog.md) diff --git a/src/core/event/index.js b/src/core/event/index.js index 9e3be2dd6..837f9e48e 100644 --- a/src/core/event/index.js +++ b/src/core/event/index.js @@ -244,9 +244,9 @@ export function Events(Base) { dom.on(sidebarElm, 'click', ({ target }) => { const linkElm = target.closest('a'); const linkParent = linkElm?.closest('li'); - const subSidebar = linkParent?.querySelector('.app-sub-sidebar'); + const hasSubSidebar = linkParent?.querySelector('.app-sub-sidebar'); - if (subSidebar) { + if (hasSubSidebar) { dom.toggleClass(linkParent, 'collapse'); } }); diff --git a/src/core/fetch/index.js b/src/core/fetch/index.js index 52b2ab1dd..be4e21409 100644 --- a/src/core/fetch/index.js +++ b/src/core/fetch/index.js @@ -1,4 +1,3 @@ -/* eslint-disable no-unused-vars */ import { getParentPath, stringifyQuery } from '../router/util.js'; import { noop, isExternal } from '../util/core.js'; import { get } from '../util/ajax.js'; @@ -262,8 +261,6 @@ export function Fetch(Base) { } initFetch() { - const { loadSidebar } = this.config; - this.$fetch(_ => this.callHook('ready')); } }; diff --git a/test/integration/__snapshots__/docs.test.js.snap b/test/integration/__snapshots__/docs.test.js.snap index 4a084fed4..ce0dc1978 100644 --- a/test/integration/__snapshots__/docs.test.js.snap +++ b/test/integration/__snapshots__/docs.test.js.snap @@ -25,6 +25,6 @@ exports[`Docs Site sidebar renders and is unchanged 1`] = ` + " `;