diff --git a/app/javascript/retrospring/features/inbox/entry/answer.ts b/app/javascript/retrospring/features/inbox/entry/answer.ts index 77440d17..c515dc30 100644 --- a/app/javascript/retrospring/features/inbox/entry/answer.ts +++ b/app/javascript/retrospring/features/inbox/entry/answer.ts @@ -30,15 +30,15 @@ export function answerEntryHandler(event: Event): void { updateDeleteButton(false); showNotification(data.message); - const sharing = inboxEntry.querySelector('.inbox-entry__sharing'); - if (sharing != null) { - sharing.dataset.inboxSharingConfigValue = JSON.stringify(data.sharing); - } - const shareButton = inboxEntry.querySelector('[data-controller="share"]'); if (shareButton != null) { shareButton.dataset.shareTextValue = decodeURIComponent(data.sharing.custom).replaceAll('+', ' '); } + + const sharing = inboxEntry.querySelector('.inbox-entry__sharing'); + if (sharing != null) { + sharing.dataset.inboxSharingConfigValue = JSON.stringify(data.sharing); + } else { (inboxEntry as HTMLElement).remove(); }