Skip to content

Commit

Permalink
Update src/pages/workspace/WorkspaceInitialPage.js
Browse files Browse the repository at this point in the history
Co-authored-by: Vinh Hoang <hoangzinhvn@gmail.com>
  • Loading branch information
dukenv0307 and hoangzinh authored Nov 14, 2023
1 parent 21d0e41 commit c57dc10
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/pages/workspace/WorkspaceInitialPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,7 @@ function WorkspaceInitialPage(props) {
const shouldShowNotFoundPage =
_.isEmpty(policy) ||
!PolicyUtils.isPolicyAdmin(policy) ||
// Somtimes, when we delete the workspace, the data is updated into Onyx faster than navigation trasaction time.
// That makes delete condition return true and not found page appears briefly before navigating.
// We check delete condition for both policy and prevPolicy to prevent the not found page showing if we are deleting the workspace
// We check isPendingDelete for both policy and prevPolicy to prevent the NotFound view from showing right after we delete the workspace
(PolicyUtils.isPendingDeletePolicy(policy) && PolicyUtils.isPendingDeletePolicy(prevPolicy));

return (
Expand Down

0 comments on commit c57dc10

Please sign in to comment.