Skip to content

Commit

Permalink
fix bug when the blog didn't contain any page
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorybesson committed Sep 26, 2016
1 parent 8d8ad43 commit 1662223
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/cli/helpers/abe-get-select-template-keys.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ var findRequestColumns = function(templatesList) {
resolve(whereKeys)
})
})
reject()
})

return p
Expand Down
6 changes: 6 additions & 0 deletions src/cli/models/Manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class Manager {
}

init() {
this._whereKeys = []
var p = new Promise((resolve, reject) => {
this._loadTime = new TimeMesure('Loading Manager')
const pathTemplate = path.join(config.root, config.templates.url)
Expand All @@ -61,6 +62,11 @@ class Manager {
this._whereKeys = whereKeys
this.updateList()
resolve()
},
() => {
// No where keys found
this.updateList()
resolve()
})
.catch((e) => {
console.log('Manager._init', e)
Expand Down

0 comments on commit 1662223

Please sign in to comment.