fix undefined clientSettings / clientStats

This commit is contained in:
serogaq 2025-03-05 20:38:23 +03:00
parent 967d091c0e
commit 578e0c8759
No known key found for this signature in database
GPG key ID: 6657A27160536D7E

View file

@ -477,9 +477,9 @@
this.dbInbound = new DBInbound(dbInbound);
this.clientSettings = this.inbound.clients ? this.inbound.clients[index] : null;
this.isExpired = this.inbound.clients ? this.inbound.isExpiry(index) : this.dbInbound.isExpiry;
this.clientStats = this.inbound.clients ? this.dbInbound.clientStats.find(row => row.email === this.clientSettings.email) : [];
this.clientStats = this.inbound.clients ? this.dbInbound.clientStats.find(row => row.email === (this.clientSettings.email ?? '-')) : [];
if (app.ipLimitEnable && this.clientSettings.limitIp) {
if (app.ipLimitEnable && this.clientSettings.limitIp && this.clientStats !== undefined) {
refreshIPs(this.clientStats.email).then((ips) => {
this.clientIps = ips;
})