mirror of
https://github.com/discourse/discourse.git
synced 2025-01-21 18:41:46 +08:00
df04a99db9
Why is this change required? The `/new-topic` route is a special route which we use to open the composer by loading a URL. By default, the `new-topic` route is replaced with the `discovery.latest` route. On a fresh page load, this makes sense since there is no template for the `new-topic` route to render. However, this behavior does not make sense if we're transition from another route. There is no need to replace the current route with the `discovery.latest` when all we want is to open the composer. What does this commit do? This commit fixes the undesirable behaviour described above by aborting the existing transition to the `new-topic` route if `transition.from` is present. This indicates that we're navigating from an existing route and we can just open the composer. |
||
---|---|---|
.. | ||
admin | ||
bootstrap-json | ||
confirm-new-email | ||
dialog-holder | ||
discourse | ||
discourse-common | ||
discourse-hbr | ||
discourse-plugins | ||
discourse-widget-hbs | ||
docs | ||
ember-addons | ||
ember-cli-progress-ci | ||
ember-production-deprecations | ||
locales | ||
patches | ||
pretty-text | ||
select-kit | ||
truth-helpers | ||
wizard | ||
.licensee.json | ||
.npmrc | ||
discourse-js-processor.js | ||
handlebars-shim.js | ||
package.json | ||
polyfills.js | ||
service-worker.js.erb | ||
yarn.lock |