Apply review suggestion from @raccube

Co-authored-by: Karina Kwiatek <6197148+raccube@users.noreply.github.com>
This commit is contained in:
Andreas Nedbal 2022-01-09 15:56:06 +01:00 committed by Andreas Nedbal
parent b287892c19
commit 60d8868306
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ export function answerboxSubscribeHandler(event: Event): void {
success: (data) => {
if (data.success) {
button.dataset.torpedo = ["yes", "no"][torpedo];
button.children[0].nextSibling.textContent = torpedo ? I18n.translate('views.actions.unsubscribe') : I18n.translate('views.actions.subscribe');
button.children[0].nextSibling.textContent = ' ' + (torpedo ? I18n.translate('views.actions.unsubscribe') : I18n.translate('views.actions.subscribe'));
showNotification(I18n.translate(`frontend.subscription.${torpedo ? 'subscribe' : 'unsubscribe'}`));
} else {
showErrorNotification(I18n.translate(`frontend.subscription.fail.${torpedo ? 'subscribe' : 'unsubscribe'}`));