Commit b69844e
authored
fix(metadata): apply ancestor templates to title defaults (#1256)
Metadata title defaults currently render without the active ancestor template. That diverges from Next.js when a child layout or page provides title.default under a parent layout title.template.
The merge path resolved only the final title after collecting templates, so object defaults skipped the stashed template used for that segment. Resolve each title as it is encountered against the current ancestor template, then stash the current layout template for descendants.
Covers the child-layout default regression and updates page-default expectations to match Next.js resolveTitle semantics.1 parent c84e383 commit b69844e
3 files changed
Lines changed: 62 additions & 43 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
346 | 369 | | |
347 | 370 | | |
348 | 371 | | |
| |||
400 | 423 | | |
401 | 424 | | |
402 | 425 | | |
403 | | - | |
| 426 | + | |
404 | 427 | | |
405 | 428 | | |
406 | 429 | | |
| |||
456 | 479 | | |
457 | 480 | | |
458 | 481 | | |
459 | | - | |
| 482 | + | |
460 | 483 | | |
461 | 484 | | |
462 | 485 | | |
463 | 486 | | |
464 | 487 | | |
465 | 488 | | |
466 | 489 | | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | 490 | | |
479 | 491 | | |
480 | 492 | | |
| |||
492 | 504 | | |
493 | 505 | | |
494 | 506 | | |
495 | | - | |
| 507 | + | |
496 | 508 | | |
497 | | - | |
498 | 509 | | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
519 | 520 | | |
520 | 521 | | |
521 | 522 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | | - | |
| 386 | + | |
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2133 | 2133 | | |
2134 | 2134 | | |
2135 | 2135 | | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
2136 | 2151 | | |
2137 | 2152 | | |
2138 | 2153 | | |
| |||
2150 | 2165 | | |
2151 | 2166 | | |
2152 | 2167 | | |
2153 | | - | |
2154 | | - | |
2155 | | - | |
| 2168 | + | |
2156 | 2169 | | |
2157 | 2170 | | |
2158 | 2171 | | |
2159 | 2172 | | |
2160 | | - | |
2161 | | - | |
2162 | | - | |
| 2173 | + | |
| 2174 | + | |
| 2175 | + | |
| 2176 | + | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
2163 | 2181 | | |
2164 | 2182 | | |
2165 | 2183 | | |
| |||
2218 | 2236 | | |
2219 | 2237 | | |
2220 | 2238 | | |
2221 | | - | |
| 2239 | + | |
2222 | 2240 | | |
2223 | 2241 | | |
2224 | 2242 | | |
| |||
0 commit comments