[fix] minor fix

This commit is contained in:
kwaroran
2023-11-13 23:40:30 +09:00
parent 3906e49c52
commit 7e57fb884c
2 changed files with 1 additions and 2 deletions

View File

@@ -79,7 +79,7 @@
translating = false
translated = false
}
if(translateText !== get(DataBase).autoTranslate){
if((!translateText) !== (!get(DataBase)?.autoTranslate)){
const marked = await ParseMarkdown(data, charArg, mode, chatID)
translating = true
const translated = await translateHTML(marked, false)

View File

@@ -168,7 +168,6 @@ export async function translateHTML(html: string, reverse:boolean): Promise<stri
if (node.nodeType === Node.TEXT_NODE) {
// Translate the text content of the node
if(node.textContent){
console.log(node.nodeName,node.textContent)
node.textContent = await translate(node.textContent || '', reverse);
}
} else if(node.nodeType === Node.ELEMENT_NODE) {