Merge pull request #1077 from jamesaanderson/jump-to-last-post-in-best-of-mode-fix

Jump to last post in "Best of" mode fix
This commit is contained in:
Robin Ward 2013-06-24 06:26:44 -07:00
commit 1b8c9d2efd
1 changed files with 1 additions and 1 deletions

View File

@ -135,7 +135,7 @@ Discourse.TopicController = Discourse.ObjectController.extend(Discourse.Selected
jumpBottom: function() { jumpBottom: function() {
if (this.get('bestOf')) { if (this.get('bestOf')) {
Discourse.TopicView.scrollTo(this.get('id'), this.get('posts').last().get('post_number')); Discourse.TopicView.scrollTo(this.get('id'), _.last(this.get('posts')).get('post_number'));
} else { } else {
Discourse.URL.routeTo(this.get('lastPostUrl')); Discourse.URL.routeTo(this.get('lastPostUrl'));
} }