From 87813d30057d29b67b2737f2d62f136e0c86641a Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Mon, 16 Oct 2023 19:38:20 +0200 Subject: [PATCH] Fix sharing condition --- .../retrospring/features/inbox/entry/answer.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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(); }