Skip to content

Commit 4c17512

Browse files
valscionKent C. Dodds
authored and
Kent C. Dodds
committed
fix: node.matches is not a function (#216)
* Fix node.matches is not a function * Simplify return clause
1 parent 2cda6a7 commit 4c17512

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/queries.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function queryAllByText(
109109
if (typeof container.matches === 'function' && container.matches(selector)) {
110110
baseArray = [container]
111111
}
112-
return Array.from([...baseArray, ...container.querySelectorAll(selector)])
112+
return [...baseArray, ...Array.from(container.querySelectorAll(selector))]
113113
.filter(node => !ignore || !node.matches(ignore))
114114
.filter(node => matcher(getNodeText(node), node, text, matchNormalizer))
115115
}

0 commit comments

Comments
 (0)