Skip to content

Commit dd08eb8

Browse files
Xiaosong Gaoimyelo
authored andcommitted
Fix: Parse alink url and unicode character error.
1 parent 404fbb6 commit dd08eb8

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
@@ -25,7 +25,7 @@ function isALinkTo (path, element) {
2525
if (arguments.length === 1) {
2626
return (element) => isALinkTo(path, element)
2727
}
28-
return element.getAttribute('href').split('?')[0] === `#${path}`
28+
return decodeURI(element.getAttribute('href').split('#')[1]) === decodeURI(path)
2929
}
3030

3131

0 commit comments

Comments
 (0)