From b8a8190a4358a587e63a1c7f7959e1abfdd7dc1b Mon Sep 17 00:00:00 2001
From: GyDi <segydi@foxmail.com>
Date: Tue, 11 Oct 2022 22:06:55 +0800
Subject: [PATCH] fix: sort proxy during loading, close #221

---
 src/components/proxy/use-sort-proxy.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/components/proxy/use-sort-proxy.ts b/src/components/proxy/use-sort-proxy.ts
index d63cb8c..0ed49b4 100644
--- a/src/components/proxy/use-sort-proxy.ts
+++ b/src/components/proxy/use-sort-proxy.ts
@@ -23,8 +23,8 @@ export default function useSortProxy(
         const ad = delayManager.getDelay(a.name, groupName);
         const bd = delayManager.getDelay(b.name, groupName);
 
-        if (ad === -1) return 1;
-        if (bd === -1) return -1;
+        if (ad === -1 || ad === -2) return 1;
+        if (bd === -1 || bd === -2) return -1;
 
         return ad - bd;
       });
-- 
GitLab