mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +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";
|
: "Finish";
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getSteps(pathName = window.location.pathname) {
|
export function getSteps() {
|
||||||
return TourObj[(pathName.replace("/", ""))];
|
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