0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 09:20:29 +01:00

Patch for wizard URL path to take account of Discourse with subdirectory base URL.

Dieser Commit ist enthalten in:
Wan Bachtiar 2022-11-11 15:56:07 +11:00
Ursprung 6f13f0e4bf
Commit 9064b2fcbb

Datei anzeigen

@ -36,6 +36,10 @@ export default Controller.extend({
@discourseComputed("wizard.id") @discourseComputed("wizard.id")
wizardUrl(wizardId) { wizardUrl(wizardId) {
let baseUrl = (window.location.href).split('/admin');
if (baseUrl.length > 1) {
return baseUrl[0] + "/w/" + dasherize(wizardId);
}
return window.location.origin + "/w/" + dasherize(wizardId); return window.location.origin + "/w/" + dasherize(wizardId);
}, },