Skip to content

Commit

Permalink
docs: Improve description of findAll
Browse files Browse the repository at this point in the history
Helps with #783
  • Loading branch information
fb55 committed Apr 22, 2022
1 parent 9db72a5 commit 5341c36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/querying.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function findOne(
} else if (test(checked)) {
elem = checked;
} else if (recurse && checked.children.length > 0) {
elem = findOne(test, checked.children);
elem = findOne(test, checked.children, true);
}
}

Expand All @@ -121,9 +121,9 @@ export function existsOne(
}

/**
* Search and array of nodes and its children for nodes passing a test function.
* Search and array of nodes and its children for elements passing a test function.
*
* Same as `find`, only with less options, leading to reduced complexity.
* Same as `find`, but limited to elements and with less options, leading to reduced complexity.
*
* @category Querying
* @param test Function to test nodes on.
Expand Down

0 comments on commit 5341c36

Please sign in to comment.