From 4d9134d381d684ff0b47390e99ef695efac6fe29 Mon Sep 17 00:00:00 2001 From: JianMiau Date: Fri, 15 Sep 2023 11:26:47 +0800 Subject: [PATCH] [fix] bug --- src/component/Room/Room.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/component/Room/Room.ts b/src/component/Room/Room.ts index ae65cb5..e7b5c66 100644 --- a/src/component/Room/Room.ts +++ b/src/component/Room/Room.ts @@ -89,8 +89,13 @@ export default class Room { data = [(connData.state ?? EGameState.Ready) + apiNum]; } } else { - target = []>this.conns.filter((filterConn) => filterConn === key); - data = [connData.state]; + if (state) { + target = []>this.conns.filter((filterConn) => filterConn === key); + data = [state]; + } else { + target = []>this.conns.filter((filterConn) => filterConn === key); + data = [connData.state]; + } } if (needData) { data.push(connData.answer);