-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Race condition on redirect 'Cannot read property 'routes' of undefined' #73
Comments
Thank you for the report, the reproduction, and the PR. All this is super valuable. Looking at the The memory consumption should be relatively insignificant even for large apps with hundreds of routes and this will better reflect the responsibility of the |
I fixed it the way you mentioned. So now all modules are loaded 🎉 But this fix doesn't solve the error "Cannot read property 'routes' of undefined" 😒 |
Looks like we did not follow up on this one. Is there anything we can do to move forward with the fix? |
I don't think it's possible to solve this bug from strategy. |
Hi and thanks for the library.
But I have an issue 😬
Description
For example, we have a categories page (lazy module) and when we click on "Categories" link in navigation we want to redirect to default category "Books" (lazy module).
How navigation looks:
Home
— Categories
— Books
The intersection observer emits 3 links sequentially and passes them to requestIdleCallback.
loadChildren
property in the router configthis.queue.remove(...)
)So after
CategoriesModule
loaded strategy doesn't loadBooksModule
.Last but not least if we go to page 'categories/books' and manually reload the page (cmd + r) we may get the error 'Cannot read property routes of undefined'. The error is not permanent and more often appears in FireFox and always appears at a slow network (you can get it if setup throttling to 4G in network tab).
Minimal Reproduction
Repo - https://github.com/Komock/quick-link-test
Demo - https://komock.github.io/quick-link-test/
The text was updated successfully, but these errors were encountered: