fix: check text content for meaningful logic
This commit is contained in:
@@ -564,14 +564,15 @@ class ClientSelectorGenerator {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (element.children.length > 0) {
|
const text = (element.textContent || "").trim();
|
||||||
return false;
|
const hasVisibleText = text.length > 0;
|
||||||
|
|
||||||
|
if (hasVisibleText || element.querySelector("svg")) {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const text = (element.textContent || "").trim();
|
if (element.children.length > 0) {
|
||||||
|
return false;
|
||||||
if (text.length > 0) {
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user