TanStack / router

🤖 Fully typesafe Router for React (and friends) w/ built-in caching, 1st class search-param APIs, client-side cache integration and isomorphic rendering.
https://tanstack.com/router
MIT License
7.19k stars 486 forks source link

fix(react-router): incorrectly always returning `undefined` as `parentMatchPromise` in the loader in the child route #1546

Closed SeanCassiere closed 2 weeks ago

SeanCassiere commented 2 weeks ago

Fixes #1540

The current implementation doesn't push any promises into the matchPromises array and as such, the parentMatchPromise is always undefined in the loader.

This change now pushes the routes into the matchPromises array restoring its outer shell to what it was prior to Tanner's commit in 1.28.2.

Not sure if there's a reason why the current implementation doesn't make use of the matchPromises array, but this fix restores the lost functionality.

nx-cloud[bot] commented 2 weeks ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit d932c709511937ee2d7453ba51a243769c79e9b6. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets - [`nx affected --targets=test:format,test:eslint,test:unit,test:build,build --parallel=3`](https://cloud.nx.app/runs/VhRcLLZxAD?utm_source=pull-request&utm_medium=comment) - [`nx affected --target=test:types --exclude=examples/**`](https://cloud.nx.app/runs/SSUQLWiYi9?utm_source=pull-request&utm_medium=comment)

Sent with 💌 from NxCloud.