Skip to content

Commit 1ed86e2

Browse files
committed
Fix next/prev links on pages with queries
1 parent 12bad02 commit 1ed86e2

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)