fix app crash when create new speech credential (#530)

* fix app crash when create new speech credential

* fix app crash when create new speech credential
This commit is contained in:
Hoan Luu Huu
2025-05-29 19:31:41 +07:00
committed by GitHub
parent 504825d699
commit 1723326890

View File

@@ -599,7 +599,7 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
useEffect(() => {
const modelId = credential?.data?.model_id || "";
if (ttsModels.length > 0 && !ttsModels.some((m) => m.value === modelId)) {
setTtsModelId(sttModels[0].value);
setTtsModelId(ttsModels[0].value);
} else {
setTtsModelId(modelId);
}