Prechádzať zdrojové kódy

fix finding client issue #884

Co-Authored-By: Alireza Ahmadi <[email protected]>
MHSanaei 1 rok pred
rodič
commit
ae7283fc73
1 zmenil súbory, kde vykonal 1 pridanie a 2 odobranie
  1. 1 2
      web/html/xui/inbounds.html

+ 1 - 2
web/html/xui/inbounds.html

@@ -726,8 +726,7 @@
                 });
                 });
             },
             },
             findIndexOfClient(clients, client) {
             findIndexOfClient(clients, client) {
-                firstKey = Object.keys(client)[0];
-                return clients.findIndex(c => c[firstKey] === client[firstKey]);
+                return clients.findIndex(item => JSON.stringify(item) === JSON.stringify(client));
             },
             },
             async addClient(clients, dbInboundId) {
             async addClient(clients, dbInboundId) {
                 const data = {
                 const data = {