fix: custom option

This commit is contained in:
Gabe Yuan
2024-04-18 09:48:07 +08:00
parent 130f1deed1
commit 2ae5d01d5c
2 changed files with 4 additions and 4 deletions

View File

@@ -266,7 +266,7 @@ export const apiTranslate = async ({
isSame = to === res.from;
const { customOption } = apiSetting;
if (customOption.trim()) {
if (customOption?.trim()) {
try {
const opt = JSON.parse(customOption);
const textPattern = opt.resPattern?.text;