about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/flavours/glitch')
-rw-r--r--app/javascript/flavours/glitch/features/subscribed_languages_modal/index.js6
1 files changed, 5 insertions, 1 deletions
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 (
       <Option
         key={value}
@@ -105,7 +109,7 @@ class SubscribedLanguagesModal extends ImmutablePureComponent {
           <p className='report-dialog-modal__lead'><FormattedMessage id='subscribed_languages.lead' defaultMessage='Only posts in selected languages will appear on your home and list timelines after the change. Select none to receive posts in all languages.' /></p>
 
           <div>
-            {availableLanguages.union(selectedLanguages).map(value => this.renderItem(value))}
+            {availableLanguages.union(selectedLanguages).delete(null).map(value => this.renderItem(value))}
           </div>
 
           <div className='flex-spacer' />