NaN is not undefined

This commit is contained in:
Sainan 2025-09-08 05:41:37 +02:00
parent 2c2d90ba23
commit 1649c295ff

View File

@ -222,7 +222,7 @@ export const sendWsBroadcastTo = (accountId: string, data: IWsMsgToClient): void
}); });
}; };
export const sendWsBroadcastEx = (data: IWsMsgToClient, accountId?: string, excludeWsid?: number): void => { export const sendWsBroadcastEx = (data: IWsMsgToClient, accountId: string | undefined, excludeWsid: number): void => {
const msg = JSON.stringify(data); const msg = JSON.stringify(data);
forEachClient(client => { forEachClient(client => {
if ((!accountId || client.accountId == accountId) && client.id != excludeWsid) { if ((!accountId || client.accountId == accountId) && client.id != excludeWsid) {