FIX: ensures /t/TOPIC_ID/POST_NUMBER is correctly routing (#7841)

FIX: ensures /t/TOPIC_ID/POST_NUMBER is correctly routing (#7841)

diff --git a/app/assets/javascripts/discourse/routes/topic.js.es6 b/app/assets/javascripts/discourse/routes/topic.js.es6
index c25d72e..4782d2d 100644
--- a/app/assets/javascripts/discourse/routes/topic.js.es6
+++ b/app/assets/javascripts/discourse/routes/topic.js.es6
@@ -225,9 +225,13 @@ const TopicRoute = Discourse.Route.extend({
 
   model(params, transition) {
     if (params.slug.match(ID_CONSTRAINT)) {
-      return DiscourseURL.routeTo(`/t/topic/${params.slug}/${params.id}`, {
+      transition.abort();
+
+      DiscourseURL.routeTo(`/t/topic/${params.slug}/${params.id}`, {
         replaceURL: true
       });
+
+      return;
     }
 
     const queryParams = transition.to.queryParams;

GitHub sha: 0733ed3a

1 Like