diff --git a/app/assets/javascripts/discourse/app/routes/topic-by-slug-or-id.js b/app/assets/javascripts/discourse/app/routes/topic-by-slug-or-id.js index 459fce0904a..4471e41869e 100644 --- a/app/assets/javascripts/discourse/app/routes/topic-by-slug-or-id.js +++ b/app/assets/javascripts/discourse/app/routes/topic-by-slug-or-id.js @@ -9,7 +9,9 @@ export default DiscourseRoute.extend({ if (params.slugOrId.match(ID_CONSTRAINT)) { return { url: `/t/topic/${params.slugOrId}` }; } else { - return Topic.idForSlug(params.slugOrId); + return Topic.idForSlug(params.slugOrId).then((data) => { + return { url: `/t/${data.slug}/${data.topic_id}` }; + }); } },