From 3cdd790fe7b087a362d55da64a382f6f9ae8bba0 Mon Sep 17 00:00:00 2001 From: satori Date: Tue, 14 Dec 2021 08:42:41 +0800 Subject: [PATCH] chat debug --- fmhub.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fmhub.js b/fmhub.js index 48ce103..8abb7af 100644 --- a/fmhub.js +++ b/fmhub.js @@ -39,7 +39,7 @@ export default class { if (!channel.size) this.channels.set(fm, channel) channel.forEach((value, userid) => { console.log(userid, value) - let user = this.users.get(userid) + let user = this.users.get(userid) || new Map() if (!user.size) return console.log("订阅频道的用户不在线, 应移除此订阅"); user.forEach((value, ws) => { ws.send(msg)