Commit 6d9caf3
authored
fix: incorrect canonicalUrl set when using output: export (#85019)
After the changes in
5ccc907,
when in `output: 'export'` mode, the `canonicalUrl` value was getting
corrupted to be set to one of the URLs of the RSC responses (eg
`/another.txt`). This is because the original `url` gets mutated to
append a `.txt` extension for the RSC requests.
This ensures we preserve the original canonical URL so it doesn't get
corrupted when we mutate the pathname.
Failing test ref:
https://github.com/vercel/next.js/actions/runs/18607156298/job/53060147186#step:34:1511 parent 2f8b1ec commit 6d9caf3
File tree
1 file changed
+7
-3
lines changed- packages/next/src/client/components/router-reducer
1 file changed
+7
-3
lines changedLines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
161 | 165 | | |
162 | 166 | | |
163 | 167 | | |
| |||
198 | 202 | | |
199 | 203 | | |
200 | 204 | | |
201 | | - | |
| 205 | + | |
202 | 206 | | |
203 | 207 | | |
204 | 208 | | |
| |||
285 | 289 | | |
286 | 290 | | |
287 | 291 | | |
288 | | - | |
| 292 | + | |
289 | 293 | | |
290 | 294 | | |
291 | 295 | | |
292 | 296 | | |
293 | 297 | | |
294 | 298 | | |
295 | 299 | | |
296 | | - | |
| 300 | + | |
297 | 301 | | |
298 | 302 | | |
299 | 303 | | |
| |||
0 commit comments