Skip to content

Commit

Permalink
fix(index): load file path error
Browse files Browse the repository at this point in the history
  • Loading branch information
QingWei-Li committed Feb 14, 2017
1 parent cc4ffb4 commit dc536a3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ const mainRender = function (cb) {
}

// replace route
route = '/' + route
if (OPTIONS.alias && OPTIONS.alias[route]) {
route = getAlias(route)
if (OPTIONS.alias && OPTIONS.alias['/' + route]) {
route = getAlias('/' + route)
} else {
route = (OPTIONS.basePath + route).replace(/\/+/, '/')
}
Expand All @@ -90,7 +89,7 @@ const mainRender = function (cb) {
}

// Render Cover page
if (OPTIONS.coverpage && page === ('/' + OPTIONS.homepage).replace(/\/+/, '/')) {
if (OPTIONS.coverpage && page === OPTIONS.homepage) {
utils.load(OPTIONS.coverpage).then(render.renderCover)
}

Expand Down

0 comments on commit dc536a3

Please sign in to comment.