Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-25 18:50:27 +01:00
move current user determination to api & remove redundant line
Dieser Commit ist enthalten in:
Ursprung
5aefa9c544
Commit
f94df66613
1 geänderte Dateien mit 1 neuen und 2 gelöschten Zeilen
|
@ -21,7 +21,7 @@ export default {
|
||||||
|
|
||||||
withPluginApi("0.8.36", (api) => {
|
withPluginApi("0.8.36", (api) => {
|
||||||
api.onAppEvent("page:changed", (data) => {
|
api.onAppEvent("page:changed", (data) => {
|
||||||
const currentUser = container.lookup("service:current-user");
|
const currentUser = api.getCurrentUser();
|
||||||
|
|
||||||
if (currentUser) {
|
if (currentUser) {
|
||||||
const redirectToWizard = currentUser.redirect_to_wizard;
|
const redirectToWizard = currentUser.redirect_to_wizard;
|
||||||
|
@ -30,7 +30,6 @@ export default {
|
||||||
.concat(["loading"]);
|
.concat(["loading"]);
|
||||||
if (
|
if (
|
||||||
redirectToWizard &&
|
redirectToWizard &&
|
||||||
data.currentRouteName !== "customWizardStep" &&
|
|
||||||
!excludedPaths.find((p) => {
|
!excludedPaths.find((p) => {
|
||||||
return data.currentRouteName.indexOf(p) > -1;
|
return data.currentRouteName.indexOf(p) > -1;
|
||||||
})
|
})
|
||||||
|
|
Laden …
In neuem Issue referenzieren