This commit is contained in:
Dmitry 2026-01-10 03:26:33 +03:00
parent b50a00a65f
commit e036011998
2 changed files with 6 additions and 1 deletions

View file

@ -102,7 +102,7 @@ export class RoomsService {
} }
// Не возвращаем пароль в ответе // Не возвращаем пароль в ответе
const { password, ...roomWithoutPassword } = room; const { password: _, ...roomWithoutPassword } = room;
return roomWithoutPassword; return roomWithoutPassword;
} }

View file

@ -58,6 +58,11 @@ const VoicePlayer = ({
React.useEffect(() => { React.useEffect(() => {
if (autoPlay && isEnabled && roomId && questionId && contentType) { 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 }); speak({ roomId, questionId, contentType, answerId });
} }
// eslint-disable-next-line react-hooks/exhaustive-deps // eslint-disable-next-line react-hooks/exhaustive-deps