From cb9e37cf30ee78223796a551669a1d696f52f275 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Thu, 24 May 2018 16:11:23 +1000 Subject: [PATCH] Fix client redirect --- .../discourse/initializers/custom-wizard-redirect.js.es6 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/javascripts/discourse/initializers/custom-wizard-redirect.js.es6 b/assets/javascripts/discourse/initializers/custom-wizard-redirect.js.es6 index 997356e7..4f60b57a 100644 --- a/assets/javascripts/discourse/initializers/custom-wizard-redirect.js.es6 +++ b/assets/javascripts/discourse/initializers/custom-wizard-redirect.js.es6 @@ -20,7 +20,9 @@ export default { const redirectToWizard = this.get('currentUser.redirect_to_wizard'); const excludedPaths = Discourse.SiteSettings.wizard_redirect_exclude_paths.split('|').concat(['loading']); - if (redirectToWizard && excludedPaths.indexOf(this.routeName) === -1) { + if (redirectToWizard && (!transition.intent.name || !excludedPaths.find((p) => { + return transition.intent.name.indexOf(p) > -1; + }))) { transition.abort(); window.location = '/w/' + redirectToWizard.dasherize(); }