From 357431fcb47f86f29cc288885bd6d1a1240e78ec Mon Sep 17 00:00:00 2001 From: IanM <16573496+imorland@users.noreply.github.com> Date: Mon, 22 Jan 2024 16:30:02 +0000 Subject: [PATCH] fix: language param not passed when anylang disabled (#55) --- js/src/forum/extendSubscriptionModal.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/src/forum/extendSubscriptionModal.js b/js/src/forum/extendSubscriptionModal.js index 1a42d82..5474093 100644 --- a/js/src/forum/extendSubscriptionModal.js +++ b/js/src/forum/extendSubscriptionModal.js @@ -11,7 +11,12 @@ export default function extendSubscriptionModal() { extend(components.SubscriptionModal.prototype, 'oninit', function () { const tag = this.attrs.model; - const subscriptionLanguage = tag.subscriptionLanguage(); + let subscriptionLanguage = tag.subscriptionLanguage(); + + if (!app.forum.attribute('fof-discussion-language.showAnyLangOpt') && subscriptionLanguage === null) { + subscriptionLanguage = app.translator.getLocale(); + } + this.language = Stream(subscriptionLanguage); });