0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-10 04:12:53 +01:00

Fix client redirect

Dieser Commit ist enthalten in:
Angus McLeod 2018-05-24 16:11:23 +10:00
Ursprung 2981c32ea5
Commit cb9e37cf30

Datei anzeigen

@ -20,7 +20,9 @@ export default {
const redirectToWizard = this.get('currentUser.redirect_to_wizard'); const redirectToWizard = this.get('currentUser.redirect_to_wizard');
const excludedPaths = Discourse.SiteSettings.wizard_redirect_exclude_paths.split('|').concat(['loading']); 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(); transition.abort();
window.location = '/w/' + redirectToWizard.dasherize(); window.location = '/w/' + redirectToWizard.dasherize();
} }