Merge branch 'main' into feat/create-private-message-updates

This commit is contained in:
Jay Sitter 2023-06-24 16:30:35 -04:00 committed by GitHub
commit f6a40fbb28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 34 additions and 6 deletions

View file

@ -273,8 +273,12 @@ export class MarkdownTextArea extends Component<
<LanguageSelect
iconVersion
allLanguages={this.props.allLanguages}
// Only set the selected language ID if it exists as an option
// in the dropdown; otherwise, set it to 0 (Undetermined)
selectedLanguageIds={
languageId ? Array.of(languageId) : undefined
languageId && this.props.siteLanguages.includes(languageId)
? [languageId]
: [0]
}
siteLanguages={this.props.siteLanguages}
onChange={this.handleLanguageChange}