diff --git a/superset/assets/javascripts/explore/stores/controls.jsx b/superset/assets/javascripts/explore/stores/controls.jsx index da6ff386ad..45a3b7cbb2 100644 --- a/superset/assets/javascripts/explore/stores/controls.jsx +++ b/superset/assets/javascripts/explore/stores/controls.jsx @@ -871,7 +871,7 @@ export const controls = { label: 'Code', description: 'Put your code here', mapStateToProps: state => ({ - language: state.controls ? state.controls.markup_type.value : null, + language: state.controls && state.controls.markup_type ? state.controls.markup_type.value : 'markdown', }), default: '', },