diff options
Diffstat (limited to 'src/fauxton/app/modules/fauxton/components.js')
-rw-r--r-- | src/fauxton/app/modules/fauxton/components.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/fauxton/app/modules/fauxton/components.js b/src/fauxton/app/modules/fauxton/components.js index 09dcc51fc..03fea872c 100644 --- a/src/fauxton/app/modules/fauxton/components.js +++ b/src/fauxton/app/modules/fauxton/components.js @@ -73,7 +73,12 @@ function(app, FauxtonAPI) { nextClicked: function (event) { event.preventDefault(); - this.previousIds.push(this.collection.first().id); + var doc = this.collection.first(); + + if (doc) { + this.previousIds.push(doc.id); + } + FauxtonAPI.navigate(this.nextUrlfn(), {trigger: false}); FauxtonAPI.triggerRouteEvent('paginate', 'next'); }, |