Skip to content

Commit ce3f4fe

Browse files
committed
fix: use querySelector to find hyperlink
nested `<a>` element should be found
1 parent 0ce2126 commit ce3f4fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pagination.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function toArray (elements) {
1919
return Array.prototype.slice.call(elements)
2020
}
2121
function findHyperlink (li) {
22-
return toArray(li.children).find((child) => child.tagName && child.tagName.toUpperCase() === 'A')
22+
return query('a', li)
2323
}
2424
function isALinkTo (path, element) {
2525
if (arguments.length === 1) {

0 commit comments

Comments
 (0)