mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-22 18:25:47 +08:00
feat: fix crash bug in getSteps()
This commit is contained in:
parent
b19be2df88
commit
7e349c1768
@ -218,6 +218,12 @@ export function getNextButtonChild(nextPathName) {
|
||||
: "Finish";
|
||||
}
|
||||
|
||||
export function getSteps(pathName = window.location.pathname) {
|
||||
return TourObj[(pathName.replace("/", ""))];
|
||||
export function getSteps() {
|
||||
const path = window.location.pathname.replace("/", "");
|
||||
const res = TourObj[path];
|
||||
if (res === undefined) {
|
||||
return [];
|
||||
} else {
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user