fix(v2): escape apostrophe in route paths (#4137)

This commit is contained in:
Alexey Pyltsyn 2021-02-01 13:30:43 +03:00 committed by GitHub
parent 98910656c4
commit d801ce50f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,7 +136,7 @@ export default async function loadRoutes(
}; };
return createRouteCodeString({ return createRouteCodeString({
routePath: routeConfig.path, routePath: routeConfig.path.replace(/'/g, "\\'"),
routeHash, routeHash,
exact, exact,
subroutesCodeStrings: subroutes?.map(generateRouteCode), subroutesCodeStrings: subroutes?.map(generateRouteCode),