Skip to content

Commit

Permalink
fix: incorrect message displayed when deleting workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
truph01 committed Oct 24, 2024
1 parent 32d4ddf commit 791649a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/workspace/WorkspacesListPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ function WorkspacesListPage() {
const workspaceAccountID = PolicyUtils.getWorkspaceAccountID(policyIDToDelete ?? '-1');
const [cardFeeds] = useOnyx(`${ONYXKEYS.COLLECTION.SHARED_NVP_PRIVATE_DOMAIN_MEMBER}${workspaceAccountID}`);
const [cardsList] = useOnyx(`${ONYXKEYS.COLLECTION.WORKSPACE_CARDS_LIST}${workspaceAccountID}_${CONST.EXPENSIFY_CARD.BANK}`);
const hasCardFeedOrExpensifyCard = !isEmptyObject(cardFeeds) || !isEmptyObject(cardsList);
const hasCardFeedOrExpensifyCard =
!isEmptyObject(cardFeeds) ||
!isEmptyObject(cardsList) ||
((PolicyUtils.getPolicy(policyIDToDelete)?.areExpensifyCardsEnabled || PolicyUtils.getPolicy(policyIDToDelete)?.areCompanyCardsEnabled) &&

Check failure on line 130 in src/pages/workspace/WorkspacesListPage.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator

Check failure on line 130 in src/pages/workspace/WorkspacesListPage.tsx

View workflow job for this annotation

GitHub Actions / ESLint check

Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator
PolicyUtils.getPolicy(policyIDToDelete)?.workspaceAccountID);

const confirmDeleteAndHideModal = () => {
if (!policyIDToDelete || !policyNameToDelete) {
Expand Down

0 comments on commit 791649a

Please sign in to comment.