Skip to content

Commit

Permalink
fix for empty welcome note
Browse files Browse the repository at this point in the history
  • Loading branch information
rojiphil committed Sep 30, 2024
1 parent 1c28c37 commit 5864ca8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/workspace/WorkspaceInviteMessagePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ function WorkspaceInviteMessagePage({policy, route, currentUserPersonalDetails}:
}, []);

useEffect(() => {
if (isEmptyObject(invitedEmailsToAccountIDsDraft)) {
if (isEmptyObject(invitedEmailsToAccountIDsDraft) || !welcomeNote) {
return;
}
setWelcomeNote(getDefaultWelcomeNote());
}, [getDefaultWelcomeNote, invitedEmailsToAccountIDsDraft]);
}, [getDefaultWelcomeNote, invitedEmailsToAccountIDsDraft, welcomeNote]);

const debouncedSaveDraft = lodashDebounce((newDraft: string | null) => {
Policy.setWorkspaceInviteMessageDraft(route.params.policyID, newDraft);
Expand Down

0 comments on commit 5864ca8

Please sign in to comment.