1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-05-13 22:16:36 +02:00

fixed bug where ExistsBySelector() would look at element's parents instead of children.

This commit is contained in:
Gabriel Marinkovic 2019-09-22 17:36:20 +02:00
parent 24f6329203
commit 69f851a002

View File

@ -468,9 +468,9 @@ func (el *HTMLElement) CountBySelector(_ context.Context, selector values.String
}
func (el *HTMLElement) ExistsBySelector(_ context.Context, selector values.String) (values.Boolean, error) {
selection := el.selection.Closest(selector.String())
selection := el.selection.Find(selector.String())
if selection == nil || selection.Length() == 0 {
if selection.Length() == 0 {
return values.False, nil
}