fix: proxy page first render

This commit is contained in:
GyDi 2022-04-02 01:23:31 +08:00
parent 7cb467c960
commit 205ecde505

View File

@ -17,7 +17,7 @@ const ProxyPage = () => {
const { data: clashConfig } = useSWR("getClashConfig", getClashConfig); const { data: clashConfig } = useSWR("getClashConfig", getClashConfig);
const modeList = ["rule", "global", "direct"]; const modeList = ["rule", "global", "direct"];
const curMode = clashConfig?.mode.toLowerCase() ?? "direct"; const curMode = clashConfig?.mode.toLowerCase();
const { groups = [], proxies = [] } = proxiesData ?? {}; const { groups = [], proxies = [] } = proxiesData ?? {};
// make sure that fetch the proxies successfully // make sure that fetch the proxies successfully