fix: dict voice not exist

This commit is contained in:
Gabe Yuan
2024-02-21 15:47:14 +08:00
parent 439900154b
commit 0280ac34c3

View File

@@ -196,7 +196,7 @@ export const apiTranslate = async ({
break;
case OPT_TRANS_GEMINI:
trText = res?.candidates
?.map((item) => item.content.parts.map((item) => item.text).join(" "))
?.map((item) => item.content?.parts.map((item) => item.text).join(" "))
.join(" ");
isSame = text === trText;
break;