From 6c495231b22577619609d1770106244b2f03ce69 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 3 Oct 2022 02:56:12 +0200 Subject: [PATCH 01/14] =?UTF-8?q?Fix=20=E2=80=9CChange=20subscribed=20lang?= =?UTF-8?q?uages=E2=80=9D=20crashing=20in=20some=20situations=20(#19268)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mastodon/features/subscribed_languages_modal/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/features/subscribed_languages_modal/index.js b/app/javascript/mastodon/features/subscribed_languages_modal/index.js index 6a1bb2c47f..a519ceabc5 100644 --- a/app/javascript/mastodon/features/subscribed_languages_modal/index.js +++ b/app/javascript/mastodon/features/subscribed_languages_modal/index.js @@ -78,6 +78,10 @@ class SubscribedLanguagesModal extends ImmutablePureComponent { const language = this.props.languages.find(language => language[0] === value); const checked = this.state.selectedLanguages.includes(value); + if (!language) { + return null; + } + return (