We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c39ac61 commit 4aae64eCopy full SHA for 4aae64e
client/src/utils/index.tsx
@@ -199,5 +199,6 @@ export function getFirstLevelRoute(path) {
199
const secondSlashIndex = path.indexOf('/', firstSlashIndex + 1);
200
201
// 如果没有找到第二个斜杠,说明路径只有一级
202
- return secondSlashIndex === -1 ? path : path.slice(0, secondSlashIndex);
+ const finalPath = secondSlashIndex === -1 ? path : path.slice(0, secondSlashIndex);
203
+ return finalPath || '/';
204
}
0 commit comments