Skip to content

Commit

Permalink
fix(render): disable rendering sub list when loadSidebar is false
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed Feb 19, 2017
1 parent be6dcac commit 35dd2e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/render/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ export function renderMixin (proto) {
}

proto._renderSidebar = function (text) {
const { maxLevel, subMaxLevel, autoHeader } = this.config
const { maxLevel, subMaxLevel, autoHeader, loadSidebar } = this.config

this._renderTo('.sidebar-nav', sidebar(text, maxLevel))
const active = getAndActive('.sidebar-nav', true, true)
subSidebar(active, subMaxLevel)
loadSidebar && subSidebar(active, subMaxLevel)
// bind event
this.activeLink = active
scrollActiveSidebar()
Expand Down

0 comments on commit 35dd2e1

Please sign in to comment.