Skip to content

Commit 4344e51

Browse files
committed
socket: return on empty userlist in onWhatsApp
1 parent 8b1cfe9 commit 4344e51

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Socket/socket.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,10 @@ export const makeSocket = (config: SocketConfig) => {
276276
}
277277
}
278278

279+
if (usyncQuery.users.length == 0) {
280+
return [] // return early without forcing an empty query
281+
}
282+
279283
const results = await executeUSyncQuery(usyncQuery)
280284

281285
if (results) {

0 commit comments

Comments
 (0)