Skip to content

Commit

Permalink
fix: Bing Dict Crush
Browse files Browse the repository at this point in the history
  • Loading branch information
Pylogmon committed Sep 15, 2023
1 parent ebd84e8 commit a364689
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/translate/bing_dict/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export async function translate(text, from, to) {
}
// only supports word translation
if (text.split(/[\s,,]/).length > 1) {
return;
return '';
}

const res = await fetch(
Expand Down
1 change: 1 addition & 0 deletions src/window/Translate/components/SourceArea/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export default function SourceArea(props) {
const textAreaRef = useRef();

const handleNewText = async (text) => {
text = text.trim();
if (hideWindow) {
appWindow.hide();
} else {
Expand Down

0 comments on commit a364689

Please sign in to comment.