diff options
Diffstat (limited to 'lib/page/index.js')
-rw-r--r-- | lib/page/index.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/page/index.js b/lib/page/index.js index 54255dd..b3ff00f 100644 --- a/lib/page/index.js +++ b/lib/page/index.js @@ -107,6 +107,8 @@ Page.prototype.read = function() { // This is used both for themes and page parsing Page.prototype.getContext = function() { var article = this.book.summary.getArticle(this); + var next = article? article.next() : null; + var prev = article? article.prev() : null; return { file: { @@ -115,8 +117,8 @@ Page.prototype.getContext = function() { }, page: { title: article? article.title : null, - next: article? article.next() : null, - previous: article? article.prev() : null + next: next? next.getContext() : null, + previous: prev? prev.getContext() : null } }; }; |