fix(render): ubtitle in side bar shows undefined, fixed #182

This commit is contained in:
qingwei.li 2017-06-03 20:11:34 +08:00
parent bb793ec08e
commit d087d5753b
No known key found for this signature in database
GPG Key ID: B6DDC2F7AE80B2F4

View File

@ -84,7 +84,7 @@ export function renderMixin (proto) {
this._renderTo('.sidebar-nav', this.compiler.sidebar(text, maxLevel))
const activeEl = getAndActive(this.router, '.sidebar-nav', true, true)
if (loadSidebar && activeEl) {
activeEl.parentNode.innerHTML += this.compiler.subSidebar(subMaxLevel)
activeEl.parentNode.innerHTML += (this.compiler.subSidebar(subMaxLevel) || '')
} else {
// reset toc
this.compiler.subSidebar()