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

(cherry picked from commit 41ae404)

(CP triggered by jasperhuangg)
  • Loading branch information
jasperhuangg authored and OSBotify committed Sep 30, 2024
1 parent 556b629 commit c24b7bc
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 c24b7bc

Please sign in to comment.