fix: not found page

This commit is contained in:
qingwei.li 2017-07-09 10:48:41 +08:00
commit 9af855921e
No known key found for this signature in database
GPG key ID: B6DDC2F7AE80B2F4
2 changed files with 15 additions and 4 deletions

View file

@ -28,17 +28,24 @@ export function fetchMixin (proto) {
// Current page is html
this.isHTML = /\.html$/g.test(path)
// Load main content
last.then((text, opt) => {
this._renderMain(text, opt)
const loadSideAndNav = () => {
if (!loadSidebar) return cb()
const fn = result => { this._renderSidebar(result); cb() }
// Load sidebar
loadNested(path, loadSidebar, fn, this, true)
}
// Load main content
last.then((text, opt) => {
this._renderMain(text, opt)
loadSideAndNav()
},
_ => this._renderMain(null))
_ => {
this._renderMain(null)
loadSideAndNav()
})
// Load nav
loadNavbar &&