Skip to content

Commit

Permalink
RegEx updated
Browse files Browse the repository at this point in the history
Following @Pant 's suggestion in dcode-youtube#7 (comment), I have made this change.

I have now tried it for a few days, and it seems to work well.
  • Loading branch information
felix-d1strict authored Jul 17, 2022
1 parent ad71994 commit f94e494
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const router = async () => {
const potentialMatches = routes.map(route => {
return {
route: route,
result: location.pathname.match(pathToRegex(route.path))
result: location.pathname.replace(/\/$/g, "").match(pathToRegex(route.path))
};
});

Expand Down Expand Up @@ -60,4 +60,4 @@ document.addEventListener("DOMContentLoaded", () => {
});

router();
});
});

0 comments on commit f94e494

Please sign in to comment.