Commit 2687842
fix: add null check for match in async loader finally block
Fixes race condition where async loader's finally block executes after
navigation has changed, causing match to be undefined when accessing
_nonReactive properties.
This resolves 11 unhandled rejection errors in unit tests:
- TypeError: Cannot read properties of undefined (reading '_nonReactive')
- All errors pointed to load-matches.ts:851 in async callback's finally block
The fix adds a null check before accessing match._nonReactive to handle
cases where the match has been removed from the router during async execution.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>1 parent 5914d25 commit 2687842
1 file changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
847 | 847 | | |
848 | 848 | | |
849 | 849 | | |
850 | | - | |
851 | | - | |
852 | | - | |
853 | | - | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
854 | 857 | | |
855 | 858 | | |
856 | 859 | | |
| |||
0 commit comments