Commit 9d94d89
committed
fix: preserve trailing slash when error boundary truncates branch
When a page's load function throws an error and the branch is truncated
to the nearest error boundary, the page-level trailingSlash config is
lost. This causes the URL to change (e.g. /test/ → /test).
Default to 'ignore' instead of 'never' when an error is present, so
the URL pathname stays unchanged. If a layout above the error boundary
has its own trailingSlash config, it still overrides the default.
Fixes #135161 parent 3804428 commit 9d94d89
File tree
5 files changed
+22
-1
lines changed- packages/kit
- src/runtime/client
- test/apps/basics
- src/routes/routing/trailing-slash/error
- always-error
- test/cross-platform
5 files changed
+22
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
636 | | - | |
| 636 | + | |
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 9 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 | + | |
1135 | 1144 | | |
1136 | 1145 | | |
1137 | 1146 | | |
| |||
0 commit comments