about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-10-18 21:21:20 +0200
committerClaire <claire.github-309c@sitedethib.com>2022-11-30 13:53:38 +0100
commite8d0a1b320713eda76f303b6e840d004f1890d27 (patch)
tree1e19401fb4c381717dd1710b61fe06902d86a7d8 /app/javascript
parent5e143db13aeffc5f0353ed7226b8f0df13763868 (diff)
[Glitch] Fix showing translate button when status has no language in web UI
Port 4adb267f9177f6036f8f27cd37544c54b97f3dd2 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/flavours/glitch/components/status_content.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/components/status_content.js b/app/javascript/flavours/glitch/components/status_content.js
index cadcf5c11..7c13c7ee4 100644
--- a/app/javascript/flavours/glitch/components/status_content.js
+++ b/app/javascript/flavours/glitch/components/status_content.js
@@ -278,7 +278,7 @@ class StatusContent extends React.PureComponent {
     } = this.props;
 
     const hidden = this.props.onExpandedToggle ? !this.props.expanded : this.state.hidden;
-    const renderTranslate = this.context.identity.signedIn && this.props.onTranslate && ['public', 'unlisted'].includes(status.get('visibility')) && status.get('contentHtml').length > 0 && intl.locale !== status.get('language');
+    const renderTranslate = this.context.identity.signedIn && this.props.onTranslate && ['public', 'unlisted'].includes(status.get('visibility')) && status.get('contentHtml').length > 0 && status.get('language') !== null && intl.locale !== status.get('language');
     const language = preloadedLanguages.find(lang => lang[0] === status.get('language'));
     const languageName = language ? language[2] : status.get('language');