Skip to content
Snippets Groups Projects
Unverified Commit c9359978 authored by GyDi's avatar GyDi
Browse files

fix: show global when no rule groups

parent 781c67b3
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,9 @@ export const useRenderList = (mode: string) => {
// global 和 direct 使用展开的样式
const useRule = mode === "rule" || mode === "script";
const renderGroups =
(useRule ? proxiesData?.groups : [proxiesData?.global!]) || [];
(useRule && proxiesData.groups.length
? proxiesData.groups
: [proxiesData.global!]) || [];
const retList = renderGroups.flatMap((group) => {
const headState = headStates[group.name] || DEFAULT_STATE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment