From e03601199820e8190cf4cebde94d91045a229050 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sat, 10 Jan 2026 03:26:33 +0300 Subject: [PATCH] abck fix --- backend/src/rooms/rooms.service.ts | 2 +- src/components/VoicePlayer.jsx | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/src/rooms/rooms.service.ts b/backend/src/rooms/rooms.service.ts index 92843e3..4a4d273 100644 --- a/backend/src/rooms/rooms.service.ts +++ b/backend/src/rooms/rooms.service.ts @@ -102,7 +102,7 @@ export class RoomsService { } // Не возвращаем пароль в ответе - const { password, ...roomWithoutPassword } = room; + const { password: _, ...roomWithoutPassword } = room; return roomWithoutPassword; } diff --git a/src/components/VoicePlayer.jsx b/src/components/VoicePlayer.jsx index 8cd405b..f9655fc 100644 --- a/src/components/VoicePlayer.jsx +++ b/src/components/VoicePlayer.jsx @@ -58,6 +58,11 @@ const VoicePlayer = ({ React.useEffect(() => { if (autoPlay && isEnabled && roomId && questionId && contentType) { + // Validate answerId for answer contentType + if (contentType === 'answer' && !answerId) { + console.warn('[VoicePlayer] autoPlay: answerId is required for answer contentType'); + return; + } speak({ roomId, questionId, contentType, answerId }); } // eslint-disable-next-line react-hooks/exhaustive-deps