Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Pylogmon authored Jun 27, 2024
1 parent 9d49aa9 commit aceea57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ async function translate(text, _from, _to, options) {

const db = await Database.load(`sqlite:plugins/translate/${id}/stardict.db`);
let res = await db.select('SELECT * FROM stardict WHERE word = $1', [text]);

await db.close();
if (res.length > 0) {
let result = res[0];
let phonetic = result.phonetic;
Expand Down

0 comments on commit aceea57

Please sign in to comment.