You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resource() has a race condition where a request change during the loader phase that happens at the right time will be dropped, causing the resource to display stale data. This seems to happen if:
While the resource is loading, the request changes
Before the effect() can run, the Promise for the previous load resolves, which sets the resource out of loading state.
The effect runs for the new request, but the resource is no longer a valid loading state per this check.
The condition in (3) is really trying to guard that the resource hasn't been set into Local state after the request changed. The check here is probably unnecessarily strict, but also, we should have a more robust way of detecting this condition.
Activity
fix(core): fix race condition in resource() (#59851)
fix(core): fix race condition in resource() (angular#59851)
angular-automatic-lock-bot commentedon Mar 8, 2025
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.