diff --git a/api/index.ts b/api/index.ts index 4169b2134..399cc481a 100644 --- a/api/index.ts +++ b/api/index.ts @@ -207,7 +207,7 @@ export default async function server(config: Config) { if (!conns || !conns.length) return; const i = webClients.indexOf(connClient); - if (!i) return; + if (i < 0) return; webClients[i].destroy(); webClients.splice(i, 1);