Skip to content

Commit e1a262c

Browse files
authored
Merge pull request #379 from rvsia/fixNextPrevLinks
Fix next/prev links on pages with queries
2 parents 12bad02 + 1ed86e2 commit e1a262c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
const findConnectedLinks = (pathname, navSchema) => navSchema.find(({ link }) => pathname.replace(/^\//, '') === link);
1+
const query = /\?.*/;
2+
3+
const findConnectedLinks = (pathname, navSchema) => navSchema.find(({ link }) => pathname.replace(/^\//, '').replace(query, '') === link);
24

35
export default findConnectedLinks;

0 commit comments

Comments
 (0)