fix: something

This commit is contained in:
GyDi 2022-11-11 22:45:32 +08:00
parent 54af0b675d
commit a211fc7c97
No known key found for this signature in database
GPG Key ID: 9C3AD40F1F99880A
2 changed files with 2 additions and 1 deletions

View File

@ -54,6 +54,7 @@ const Layout = () => {
// the clash info may be updated
await getAxios(true);
mutate("getProxies");
mutate("getVersion");
mutate("getClashConfig");
});

View File

@ -42,7 +42,7 @@ const ProxyPage = () => {
// 仅mode为全局和直连的时候展示global分组
const displayGroups = useMemo(() => {
if (!global) return groups;
if (curMode === "global" || curMode === "direct")
if (curMode === "global" || curMode === "direct" || groups.length === 0)
return [global, ...groups];
return groups;
}, [global, groups, curMode]);