fix: bing dict

This commit is contained in:
Gabe
2025-10-10 00:08:38 +08:00
parent 9bafc937d5
commit 769a4f00aa
2 changed files with 2 additions and 2 deletions

View File

@@ -140,7 +140,7 @@ export const apiMicrosoftDict = async (text) => {
const parser = new DOMParser();
const doc = parser.parseFromString(str, "text/html");
const word = doc.querySelector("#headword > h1").textContent.trim();
const word = doc.querySelector("#headword > h1")?.textContent.trim();
if (!word) {
return null;
}