mirror of
https://github.com/discourse/discourse.git
synced 2025-03-05 02:54:25 +08:00

What is the problem we are trying to solve here? The `/` path in our Ember app leads to the `discovery.index` route but we actually don't render anything on that route leading to a blank page if the Ember app were to transition to it which is what was happening when a user adds a custom sidebar section link with the `/` path. What is the fix there? Instead of generating a link for the `discovery.index` route when creating the sidebar section link, we detect if the Ember route is `discovery.index` and change it to the `discovery.${defaultHomepage()}` route instead.