From f8d7740b5fc4255cbbdc3edcbcbb90726700786d Mon Sep 17 00:00:00 2001 From: mhawryluk Date: Fri, 19 Dec 2025 11:46:41 +0100 Subject: [PATCH 1/2] fix: Workspaces page crashing when Domain data is incomplete --- src/pages/workspace/WorkspacesListPage.tsx | 2 +- src/types/onyx/Domain.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/workspace/WorkspacesListPage.tsx b/src/pages/workspace/WorkspacesListPage.tsx index 7521e100232c..9dd9f41cde17 100755 --- a/src/pages/workspace/WorkspacesListPage.tsx +++ b/src/pages/workspace/WorkspacesListPage.tsx @@ -585,7 +585,7 @@ function WorkspacesListPage() { } return Object.values(allDomains).reduce((domainItems, domain) => { - if (!domain) { + if (!domain || domain.accountID === undefined || !domain.email) { return domainItems; } diff --git a/src/types/onyx/Domain.ts b/src/types/onyx/Domain.ts index 22a3bd61f603..7eb6cac4eae3 100644 --- a/src/types/onyx/Domain.ts +++ b/src/types/onyx/Domain.ts @@ -18,7 +18,7 @@ type Domain = OnyxCommon.OnyxValueWithOfflineFeedback<{ email: string; /** Validation code for the domain */ - validateCode: string; + validateCode?: string; /** Whether domain validation is pending */ isValidationPending?: boolean; From e7338b90eb31daeeee5892400f9d597f43d0a04d Mon Sep 17 00:00:00 2001 From: mhawryluk Date: Fri, 19 Dec 2025 12:23:10 +0100 Subject: [PATCH 2/2] Review fix --- src/pages/workspace/WorkspacesListPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/WorkspacesListPage.tsx b/src/pages/workspace/WorkspacesListPage.tsx index 9dd9f41cde17..aac4c45b15f0 100755 --- a/src/pages/workspace/WorkspacesListPage.tsx +++ b/src/pages/workspace/WorkspacesListPage.tsx @@ -585,7 +585,7 @@ function WorkspacesListPage() { } return Object.values(allDomains).reduce((domainItems, domain) => { - if (!domain || domain.accountID === undefined || !domain.email) { + if (!domain || !domain.accountID || !domain.email) { return domainItems; }