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.
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
fix: app goes to workspace initial page when back from not found page #49226
fix: app goes to workspace initial page when back from not found page #49226
Changes from 2 commits
511c9ad
1df33b4
2e0ee31
8842853
e43dcd1
c904709
8603898
a34be5b
4e693e4
09e9fb1
b90ad82
9e9b2a8
d0c483a
68e8297
d0d5b4c
0386167
33b1993
da44573
63029f1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index: routes.length - 1
should be enough. The index for the stack points to the last element of the array.BTW the current implementation for calculating the index would break if there is more than one screen with given name. It's not possible for the workspace initial but it is possible for other screens.
Maybe we should limit this function to filter out just the last found route with this name? It may make sense even with fixed
index
implementation to limit this function.Also maybe we don't have to call reset if we haven't removed any route?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After testing, I found this function does not work properly since the
Workspace_Initial
is always insideFullScreenNavigator
, so we cannot filter out theWorkspace_Initial
by usingstate.routes?.filter((item) => item.name !== screen)
. It prevents the app from working properly when deep linking.