FIX: the back button (#130)

Back button wasn't working when running in Ember CLI. This PR fixes it by doing the transition to the same route but without URL parameter properly. This works in both our environments (legacy-3.12.0, and ember-cli-3.15.0).
This commit is contained in:
Andrei Prigorshnev 2021-08-11 14:13:39 +04:00 committed by GitHub
parent 7a348aaa8b
commit e85aab4b33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 9 deletions

View File

@ -155,8 +155,7 @@ export default Ember.Controller.extend({
selectedQueryId: null,
sortBy: ["last_run_at:desc"],
});
this.send("refreshModel");
this.transitionToRoute("adminPlugins.explorer");
this.transitionToRoute({ queryParams: { id: null } });
},
showHelpModal() {

View File

@ -40,11 +40,4 @@ export default DiscourseRoute.extend({
setupController(controller, model) {
controller.setProperties(model);
},
actions: {
refreshModel() {
this.refresh();
return false;
},
},
});