Skip to content

Commit

Permalink
Merge pull request #49955 from rojiphil/49899-invite-message-deletion
Browse files Browse the repository at this point in the history
fix for empty welcome note
  • Loading branch information
jasperhuangg authored Sep 30, 2024
2 parents 96d8973 + 5864ca8 commit 41ae404
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 41ae404

Please sign in to comment.