@solidjs/router 0.10.8 → 0.10.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -1
- package/dist/routing.js +4 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -255,7 +255,10 @@ function createRoutes(routeDef, base = "") {
|
|
|
255
255
|
return asArray(routeDef.path).reduce((acc, path) => {
|
|
256
256
|
for (const originalPath of expandOptionals(path)) {
|
|
257
257
|
const path = joinPaths(base, originalPath);
|
|
258
|
-
|
|
258
|
+
let pattern = isLeaf ? path : path.split("/*", 1)[0];
|
|
259
|
+
pattern = pattern.split("/").map(s => {
|
|
260
|
+
return s.startsWith(':') || s.startsWith('*') ? s : encodeURIComponent(s);
|
|
261
|
+
}).join("/");
|
|
259
262
|
acc.push({
|
|
260
263
|
...shared,
|
|
261
264
|
originalPath,
|
package/dist/routing.js
CHANGED
|
@@ -67,7 +67,10 @@ export function createRoutes(routeDef, base = "") {
|
|
|
67
67
|
return asArray(routeDef.path).reduce((acc, path) => {
|
|
68
68
|
for (const originalPath of expandOptionals(path)) {
|
|
69
69
|
const path = joinPaths(base, originalPath);
|
|
70
|
-
|
|
70
|
+
let pattern = isLeaf ? path : path.split("/*", 1)[0];
|
|
71
|
+
pattern = pattern.split("/").map((s) => {
|
|
72
|
+
return (s.startsWith(':') || s.startsWith('*')) ? s : encodeURIComponent(s);
|
|
73
|
+
}).join("/");
|
|
71
74
|
acc.push({
|
|
72
75
|
...shared,
|
|
73
76
|
originalPath,
|