fix(library): load collection child route properly TASK-1216 #5220
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fix collection child not loading (UI displays infinite spinner) when trying to navigate into the collection child consecutive times.
Notes
For cached asset
PermProtectedRoute
was skipping the Reflux action call, and using the callback function directly. UnfortunatelyAssetRoute
is expecting the Reflux action to happen (regardless if response comes from cache). This is sign of a bigger issue in our codebase - #4835 brought asset cache that is causing bugs, but the fact that we have a mess in the ways of loading the asset is the real culprit.Testing
Given the fact that
PermProtectedRoute
is being used for many (27!) different routes, so it would be best if tester would visit each of them, just to verify they still load properly :)Besides that, please follow reproduction steps from Notion task description.
Related issues
This is caused by the dreaded #4835