mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Linking to /new-topic
from /latest
`/new-topic` redirects back to `/latest`, so the ember router considers this to be a 'refresh'. This triggers the `resetParams()` logic, which would cause the transition to abort, and the composer would never open. This commit fixes the `resetParams()` logic so that it uses the default values, instead of setting everything to `null`. Therefore the transition is no longer aborted, and the composer opens successfully. Unfortunately I have not been able to reproduce the issue in a QUnit test.
This commit is contained in:
parent
8e68244eea
commit
583226d295
@ -25,9 +25,10 @@ const controllerOpts = {
|
|||||||
expandAllPinned: false,
|
expandAllPinned: false,
|
||||||
|
|
||||||
resetParams() {
|
resetParams() {
|
||||||
Object.keys(this.get("model.params") || {}).forEach(key =>
|
Object.keys(this.get("model.params") || {}).forEach(key => {
|
||||||
this.set(key, null)
|
// controllerOpts contains the default values for parameters, so use them. They might be null.
|
||||||
);
|
this.set(key, controllerOpts[key]);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
Loading…
Reference in New Issue
Block a user