Context is undefined in __root__ match
Describe the bug
Randomly context in __root__ is undefined. Devtools show that context is defined in layout route $lang matcg under __root__, but at the same time is undefined in __root__ match. I cannot even catch exact situation when it happens on my website. Sometimes I open website and it crashes with "cannot descructive property ... from undefined" error. I managed to replace in all my cases useRouteContext({from: "__root__"}) to useRouteContext({from: /$lang"}) and now it is not happen, but it is still an issue, I think
Your Example Website or App
Steps to Reproduce the Bug or Issue
I don't have exact steps to reproduce.
Expected behavior
I excpected if I set context in <RouterProvider> it will be available always
Screenshots or Videos
No response
Platform
- Version 1.34.9 — 1.36.3 probably earlier that 1.34.9, I have updated from 1.33.4 to 1.34.9 and the issue was introduced and still persist
Additional context
No response
I'm also still experiencing issues with undefined context in the latest release and since the last several versions. The latest PR addressing the issue did nothing for me. Can also confirm that downgrading to 1.33.4 fixes all the undefined context issues. Seems it was introduced in 1.33.6.
I did some more testing and not all issues with context are fixed in 1.33.4, context is always available, but some variables inside context are undefined. I had to revert all the way back to 1.31.0 to fix these issues, seems like everything started to break in 1.31.1.
can you please provide a minimal complete example by forking one of the existing examples on stackblitz?
Closing this, since there's no reproduction. Plus, #1892 seems to be a similar issue with a reproduction available.