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

View File

@ -135,7 +135,7 @@ Discourse.TopicController = Discourse.ObjectController.extend(Discourse.Selected
jumpBottom: function() {
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 {
Discourse.URL.routeTo(this.get('lastPostUrl'));
}