From 190c10e1165b8c8564c4a1402cc9315dc49ca3ea Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Tue, 15 Sep 2026 01:12:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(voices):=20clonedVoices=20=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E4=B8=BA=20undefined=20=E5=85=9C=E5=BA=95=EF=BC=9BTS?= =?UTF-8?q?=20=E4=B8=A5=E6=A0=BC=E6=A8=A1=E5=BC=8F=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/pages/voices/components/TtsModal.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/web/src/pages/voices/components/TtsModal.tsx b/apps/web/src/pages/voices/components/TtsModal.tsx index 953792f43..3ad346162 100755 --- a/apps/web/src/pages/voices/components/TtsModal.tsx +++ b/apps/web/src/pages/voices/components/TtsModal.tsx @@ -34,9 +34,10 @@ const TtsModal: React.FC = ({ onSave, }) => { // 预置音色(含空默认)仅支持 zh/en;克隆音色支持全语言列表 + const clonedList = clonedVoices ?? [] const isCloneVoice = useMemo( - () => !!ttsVoiceId && clonedVoices.some((v) => v.id === ttsVoiceId), - [ttsVoiceId, clonedVoices], + () => !!ttsVoiceId && clonedList.some((v) => v.id === ttsVoiceId), + [ttsVoiceId, clonedList], ) const languageOptions = isCloneVoice ? CLONE_TTS_LANGUAGE_OPTIONS : PRESET_TTS_LANGUAGE_OPTIONS