Skip to content

Commit

Permalink
fix: update regex to be more efficient
Browse files Browse the repository at this point in the history
Co-authored-by: Rafał Chłodnicki <rchl2k@gmail.com>
  • Loading branch information
marcelobotega and rchl committed May 17, 2023
1 parent bce4af8 commit 125094b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/utils/src/route.js
Expand Up @@ -97,7 +97,7 @@ function cleanChildrenRoutes (routes, isChild = false, routeNameSplitter = '-',
return routes
}

const DYNAMIC_ROUTE_REGEX = /^\/?.*([:*])/
const DYNAMIC_ROUTE_REGEX = /[:*]/

export const sortRoutes = function sortRoutes (routes) {
routes.sort((a, b) => {
Expand Down

0 comments on commit 125094b

Please sign in to comment.