From 766d3b5fc96d9d3fb20c98ec878bcd5cd9e728e4 Mon Sep 17 00:00:00 2001 From: merefield Date: Thu, 14 Sep 2023 20:02:02 +0100 Subject: [PATCH] fix erroneous route transitions --- .../discourse/controllers/admin-wizards-api-show.js.es6 | 2 +- .../discourse/controllers/custom-wizard-step.js.es6 | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/assets/javascripts/discourse/controllers/admin-wizards-api-show.js.es6 b/assets/javascripts/discourse/controllers/admin-wizards-api-show.js.es6 index f847422e..31b91e16 100644 --- a/assets/javascripts/discourse/controllers/admin-wizards-api-show.js.es6 +++ b/assets/javascripts/discourse/controllers/admin-wizards-api-show.js.es6 @@ -251,7 +251,7 @@ export default Controller.extend({ .catch(popupAjaxError) .then((result) => { if (result.success) { - this.router.transitionToRoute("adminWizardsApis").then(() => { + this.router.transitionTo("adminWizardsApis").then(() => { this.send("refreshModel"); }); } diff --git a/assets/javascripts/discourse/controllers/custom-wizard-step.js.es6 b/assets/javascripts/discourse/controllers/custom-wizard-step.js.es6 index f38747d1..1eda541c 100644 --- a/assets/javascripts/discourse/controllers/custom-wizard-step.js.es6 +++ b/assets/javascripts/discourse/controllers/custom-wizard-step.js.es6 @@ -17,12 +17,13 @@ export default Controller.extend({ const wizardId = this.get("wizard.id"); window.location.href = getUrl(`/w/${wizardId}/steps/${nextStepId}`); } else { - this.router.transitionToRoute("customWizardStep", nextStepId); + debugger; + this.router.transitionTo("customWizardStep", nextStepId); } }, goBack() { - this.router.transitionToRoute( + this.router.transitionTo( "customWizardStep", this.get("step.previous") );