Commit 15fc85e1 authored by 钟卫鹏's avatar 钟卫鹏

fix: 处理直接访问链接不跳转到首页的问题

parent 03b59051
......@@ -7,7 +7,7 @@ import { getAuth } from "./auth";
*/
const defaultHomePath = (auth?): string => {
const userAuth = auth || getAuth();
if (userAuth.urls.includes(SRM_PURCHASER_HOME_PATH)) {
if (userAuth?.urls && userAuth.urls.includes(SRM_PURCHASER_HOME_PATH)) {
return SRM_PURCHASER_HOME_PATH;
}
return HOME_PATH;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment