fix(widget-code): use snake case for default language option (#3155)

This commit is contained in:
Erez Rokah 2020-01-27 22:30:36 -08:00 committed by GitHub
parent a9b350d988
commit 32854de41c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,7 +122,7 @@ export default class CodeControl extends React.Component {
getInitialLang = () => {
const { value, field } = this.props;
const lang =
(this.valueIsMap() && value && value.get(this.keys.lang)) || field.get('defaultLanguage');
(this.valueIsMap() && value && value.get(this.keys.lang)) || field.get('default_language');
const langInfo = this.getLanguageByName(lang);
if (lang && !langInfo) {
this.setState({ unknownLang: lang });