handle null tagname (#2212)

This commit is contained in:
Shuchang Zheng
2025-04-22 18:48:01 +08:00
committed by GitHub
parent c69e5848ed
commit de67f69252

View File

@@ -1403,7 +1403,11 @@ async function buildElementTree(
return;
}
const tagName = element.tagName.toLowerCase();
const tagName = element.tagName?.toLowerCase();
if (!tagName) {
console.log("get a null tagName");
return;
}
// skip proccessing option element as they are already added to the select.options
if (tagName === "option") {