Skip to content

Commit

Permalink
Merge pull request #4 from Mar0xy/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
ifyour committed Jan 26, 2024
2 parents f8fa997 + 9ebaf83 commit 6c5d1a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async function query(
code: 200,
message: 'success',
data: result?.texts?.[0]?.text,
source_lang: params?.source_lang || 'auto',
source_lang: params?.source_lang || result?.lang || 'auto',
target_lang: params?.target_lang || 'en',
alternatives: result.texts?.[0]?.alternatives?.map?.(item => item.text),
};
Expand Down

0 comments on commit 6c5d1a1

Please sign in to comment.