Skip to content

Commit fc367fa

Browse files
committed
fix: #224
1 parent 8256dcf commit fc367fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/matcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function hasAttrib(elem: HTMLElement, name: string) {
8080
function findOne(test: Predicate, elems: Node[]) {
8181
let elem = null as HTMLElement | null;
8282

83-
for (let i = 0, l = elems.length; i < l && !elem; i++) {
83+
for (let i = 0, l = elems?.length; i < l && !elem; i++) {
8484
const el = elems[i];
8585
if (test(el)) {
8686
elem = el;

0 commit comments

Comments
 (0)