diff --git a/app/assets/javascripts/discourse/controllers/topic.js.es6 b/app/assets/javascripts/discourse/controllers/topic.js.es6 index bc42e729259..ef4dfad0b63 100644 --- a/app/assets/javascripts/discourse/controllers/topic.js.es6 +++ b/app/assets/javascripts/discourse/controllers/topic.js.es6 @@ -454,7 +454,15 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, { }, jumpToPost(postNumber) { - this._jumpToPostId(this.get('model.postStream').findPostIdForPostNumber(postNumber)); + const postStream = this.get('model.postStream'); + let postId = postStream.findPostIdForPostNumber(postNumber); + + // If we couldn't find the post, find the closest post to it + if (!postId) { + const closest = postStream.closestPostNumberFor(postNumber); + postId = postStream.findPostIdForPostNumber(closest); + } + this._jumpToPostId(postId); }, jumpTop() {