修正一个由于修改数据结构导致的多人模式报错的bug

This commit is contained in:
zhl 2021-05-14 12:42:38 +08:00
parent 784141e99e
commit 8cf133b200

View File

@ -80,7 +80,7 @@ export async function startGame(roomId: string, sessionId: string) {
export async function sendOneQuestion(history: any) {
const roomId = history.room
new Schedule().stopSchedule(history.scheduleKey)
if (history.current >= history.questions.length) {
if (history.current >= history.questions.size) {
console.log('match over')
history.status = 9
await history.save()