diff --git a/web/assets/js/util/index.js b/web/assets/js/util/index.js index 4bf760d7..bb47f538 100644 --- a/web/assets/js/util/index.js +++ b/web/assets/js/util/index.js @@ -326,6 +326,14 @@ class ObjectUtil { return false; } } + for (const key in b) { + if (!b.hasOwnProperty(key)) { + continue; + } + if (!a.hasOwnProperty(key)) { + return false; + } + } return true; } } diff --git a/web/html/inbounds.html b/web/html/inbounds.html index 830c940f..58a4e5a5 100644 --- a/web/html/inbounds.html +++ b/web/html/inbounds.html @@ -983,11 +983,13 @@ const list = this.clientCount[inbound.id][this.filterBy]; if (list.length > 0) { const filteredSettings = { "clients": [] }; - inboundSettings.clients.forEach(client => { - if (list.includes(client.email)) { - filteredSettings.clients.push(client); - } - }); + if (inboundSettings.clients) { + inboundSettings.clients.forEach(client => { + if (list.includes(client.email)) { + filteredSettings.clients.push(client); + } + }); + } newInbound.settings = Inbound.Settings.fromJson(inbound.protocol, filteredSettings); this.searchedInbounds.push(newInbound); }