From 9c7b501fd2b41fac63554311aed5afb688eb44e4 Mon Sep 17 00:00:00 2001 From: martmull Date: Mon, 10 Jun 2024 15:43:37 +0200 Subject: [PATCH] Code review return --- .../src/modules/onboarding/hooks/useSetNextOnboardingStep.ts | 4 +++- .../workspace/utils/__tests__/sanitizeEmailList.test.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/twenty-front/src/modules/onboarding/hooks/useSetNextOnboardingStep.ts b/packages/twenty-front/src/modules/onboarding/hooks/useSetNextOnboardingStep.ts index 103bddfa4e57..78977c247068 100644 --- a/packages/twenty-front/src/modules/onboarding/hooks/useSetNextOnboardingStep.ts +++ b/packages/twenty-front/src/modules/onboarding/hooks/useSetNextOnboardingStep.ts @@ -11,7 +11,9 @@ const getNextOnboardingState = ( workspaceMembers: WorkspaceMember[], ) => { if (currentOnboardingStep === OnboardingStep.SyncEmail) { - return workspaceMembers.length === 1 ? OnboardingStep.InviteTeam : null; + return workspaceMembers && workspaceMembers.length > 1 + ? null + : OnboardingStep.InviteTeam; } return null; }; diff --git a/packages/twenty-front/src/modules/workspace/utils/__tests__/sanitizeEmailList.test.ts b/packages/twenty-front/src/modules/workspace/utils/__tests__/sanitizeEmailList.test.ts index f3f29edd0bbb..0a7706aca197 100644 --- a/packages/twenty-front/src/modules/workspace/utils/__tests__/sanitizeEmailList.test.ts +++ b/packages/twenty-front/src/modules/workspace/utils/__tests__/sanitizeEmailList.test.ts @@ -7,7 +7,7 @@ describe('sanitizeEmailList', () => { 'toto2@toto.com', ]); }); - it('should remove trim spaces', () => { + it('should trim spaces', () => { expect(sanitizeEmailList([' toto@toto.com ', ' toto2@toto.com'])).toEqual([ 'toto@toto.com', 'toto2@toto.com',