From 6ee768b7b285382fce3270ad4cf06c71838182d8 Mon Sep 17 00:00:00 2001 From: Claire Date: Sun, 2 Oct 2022 19:48:24 +0200 Subject: Fix “Change subscribed languages” crashing in some situations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../flavours/glitch/features/subscribed_languages_modal/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/javascript') diff --git a/app/javascript/flavours/glitch/features/subscribed_languages_modal/index.js b/app/javascript/flavours/glitch/features/subscribed_languages_modal/index.js index 55404c184..3047b434c 100644 --- a/app/javascript/flavours/glitch/features/subscribed_languages_modal/index.js +++ b/app/javascript/flavours/glitch/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 (