We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54a9ca0 commit f6c8989Copy full SHA for f6c8989
1 file changed
src/utils/WebSocket.ts
@@ -138,6 +138,9 @@ export class WebSocketConnection implements IWebSocketConnection {
138
}
139
140
broadcastAllRooms(data: any, includeSelf = false): void {
141
+ if (this.rooms.size === 0) {
142
+ throw new Error("no rooms provided.");
143
+ }
144
this.rooms.forEach(room => {
145
this.manager.broadcast(data, { room, excludeId: includeSelf ? undefined : this.id });
146
});
0 commit comments