Commit 5134aa2
refactor(router-core): shouldExecuteBeforeLoad is always true (#4992)
Fix #4971 (comment)
With the code now simplified by previous PRs, we noticed that the
`shouldExecuteBeforeLoad` guard is always true, so we can clean it up.
In a follow up PR, we'll revise the conditions under which a
`beforeLoad` should be called or skipped.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Refactor**
* Streamlined pre-load checks and execution flow, reducing branching and
improving consistency across client and server rendering.
* Unified orchestration of the before-load phase to simplify control
flow and improve maintainability.
* **Bug Fixes**
* More reliable handling of redirects and “not found” states during
preloading, preventing unintended execution paths and improving
navigation stability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>1 parent a7504ae commit 5134aa2
1 file changed
+12
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
| 150 | + | |
| 151 | + | |
154 | 152 | | |
| 153 | + | |
155 | 154 | | |
156 | 155 | | |
157 | 156 | | |
| |||
302 | 301 | | |
303 | 302 | | |
304 | 303 | | |
305 | | - | |
| 304 | + | |
306 | 305 | | |
307 | 306 | | |
308 | 307 | | |
309 | | - | |
| 308 | + | |
310 | 309 | | |
311 | 310 | | |
312 | 311 | | |
| |||
315 | 314 | | |
316 | 315 | | |
317 | 316 | | |
318 | | - | |
| 317 | + | |
319 | 318 | | |
320 | 319 | | |
321 | 320 | | |
322 | 321 | | |
323 | | - | |
324 | 322 | | |
325 | | - | |
326 | | - | |
327 | | - | |
| 323 | + | |
328 | 324 | | |
329 | 325 | | |
330 | 326 | | |
331 | 327 | | |
332 | 328 | | |
333 | | - | |
334 | 329 | | |
335 | 330 | | |
336 | | - | |
| 331 | + | |
337 | 332 | | |
338 | 333 | | |
339 | 334 | | |
| |||
494 | 489 | | |
495 | 490 | | |
496 | 491 | | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
| 492 | + | |
| 493 | + | |
513 | 494 | | |
514 | 495 | | |
| 496 | + | |
| 497 | + | |
515 | 498 | | |
516 | 499 | | |
517 | 500 | | |
| |||
0 commit comments