mirror of
https://github.com/jambonz/jambonz-webapp.git
synced 2026-07-04 19:21:58 +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(() => {
|
useEffect(() => {
|
||||||
const modelId = credential?.data?.model_id || "";
|
const modelId = credential?.data?.model_id || "";
|
||||||
if (ttsModels.length > 0 && !ttsModels.some((m) => m.value === modelId)) {
|
if (ttsModels.length > 0 && !ttsModels.some((m) => m.value === modelId)) {
|
||||||
setTtsModelId(sttModels[0].value);
|
setTtsModelId(ttsModels[0].value);
|
||||||
} else {
|
} else {
|
||||||
setTtsModelId(modelId);
|
setTtsModelId(modelId);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user