Commit 98f66e4
committed
fix: preserve trailingSlash when error boundary truncates the branch
When an error occurs during loading, the client router truncates the
branch to the nearest error boundary. If trailingSlash was configured
at the page level (below the error boundary), the setting was lost,
causing the URL to be rewritten without the trailing slash.
Preserve the trailingSlash value from the full branch before truncation
by propagating it to the error node in both load_route and
set_nearest_error_page.
Fixes #135161 parent d027236 commit 98f66e4
File tree
8 files changed
+58
-1
lines changed- .changeset
- packages/kit
- src/runtime/client
- test/apps/basics
- src/routes/routing/trailing-slash/always
- error-boundary
- test/cross-platform
8 files changed
+58
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1193 | 1193 | | |
1194 | 1194 | | |
1195 | 1195 | | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
1196 | 1210 | | |
1197 | 1211 | | |
1198 | 1212 | | |
1199 | | - | |
| 1213 | + | |
1200 | 1214 | | |
1201 | 1215 | | |
1202 | 1216 | | |
| |||
2401 | 2415 | | |
2402 | 2416 | | |
2403 | 2417 | | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
2404 | 2428 | | |
2405 | 2429 | | |
2406 | 2430 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
packages/kit/test/apps/basics/src/routes/routing/trailing-slash/always/error-boundary/+page.svelte
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1132 | 1132 | | |
1133 | 1133 | | |
1134 | 1134 | | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
1135 | 1149 | | |
1136 | 1150 | | |
1137 | 1151 | | |
| |||
0 commit comments