Skip to content

Commit 2b31276

Browse files
authored
Merge pull request #52957 from Pujan92/fix/50671
Fix: Workspace - Correct message shown in delete modal while deleting from profile page
2 parents 50101d8 + 53a4d1f commit 2b31276

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pages/workspace/WorkspaceProfilePage.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ function WorkspaceProfilePage({policyDraft, policy: policyProp, route}: Workspac
6161
const workspaceAccountID = PolicyUtils.getWorkspaceAccountID(policy?.id ?? '-1');
6262
const [cardFeeds] = useOnyx(`${ONYXKEYS.COLLECTION.SHARED_NVP_PRIVATE_DOMAIN_MEMBER}${workspaceAccountID}`);
6363
const [cardsList] = useOnyx(`${ONYXKEYS.COLLECTION.WORKSPACE_CARDS_LIST}${workspaceAccountID}_${CONST.EXPENSIFY_CARD.BANK}`);
64-
const hasCardFeedOrExpensifyCard = !isEmptyObject(cardFeeds) || !isEmptyObject(cardsList);
64+
const hasCardFeedOrExpensifyCard =
65+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
66+
!isEmptyObject(cardFeeds) || !isEmptyObject(cardsList) || ((policy?.areExpensifyCardsEnabled || policy?.areCompanyCardsEnabled) && policy?.workspaceAccountID);
6567

6668
const [street1, street2] = (policy?.address?.addressStreet ?? '').split('\n');
6769
const formattedAddress =

0 commit comments

Comments
 (0)