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

FEATURE: implement way to temporarily ignore redirect

Dieser Commit ist enthalten in:
merefield 2023-09-06 13:29:21 +01:00
Ursprung fee56c2d43
Commit 8332818616

Datei anzeigen

@ -22,6 +22,7 @@ export default {
withPluginApi("0.8.36", (api) => {
api.onAppEvent("page:changed", (data) => {
const currentUser = api.getCurrentUser();
const searchParams = new URLSearchParams(window.location.search);
if (currentUser) {
const redirectToWizard = currentUser.redirect_to_wizard;
@ -30,6 +31,7 @@ export default {
.concat(["loading"]);
if (
redirectToWizard &&
!searchParams.has('ignore_redirect') &&
data.currentRouteName !== "customWizardStep" &&
!excludedPaths.find((p) => {
return data.currentRouteName.indexOf(p) > -1;