Skip to content

Commit b4bfad2

Browse files
author
EBAM006
committed
refactor: inline includeHIddenElements computatiion
1 parent dfcd2ed commit b4bfad2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/helpers/findAll.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ export function findAll(
1313
options?: FindAllOptions
1414
) {
1515
const results = root.findAll(predicate);
16-
const includeHiddenElementsQueryOption =
17-
options?.includeHiddenElements ?? options?.hidden;
18-
const defaultIncludeHiddenElements =
19-
getConfig()?.defaultIncludeHiddenElements ?? getConfig()?.defaultHidden;
2016

2117
const hidden =
22-
includeHiddenElementsQueryOption ?? defaultIncludeHiddenElements;
18+
options?.includeHiddenElements ??
19+
options?.hidden ??
20+
getConfig()?.defaultIncludeHiddenElements ??
21+
getConfig()?.defaultHidden;
22+
2323
if (hidden) {
2424
return results;
2525
}

0 commit comments

Comments
 (0)