mirror of
https://github.com/jambonz/jambonz-webapp.git
synced 2025-12-19 05:37:43 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user