mirror of https://github.com/apache/superset.git
[fix] JS error out when rename a new chart (#6752)
This commit is contained in:
parent
97cb10dbc8
commit
879c553b0a
|
@ -176,10 +176,12 @@ AnnotationLayerControl.defaultProps = defaultProps;
|
|||
// directly, could not figure out how to get access to the color_scheme
|
||||
function mapStateToProps({ charts, explore }) {
|
||||
const chartKey = getChartKey(explore);
|
||||
const chart = charts[chartKey] || charts[0] || {};
|
||||
|
||||
return {
|
||||
colorScheme: (explore.controls || {}).color_scheme.value,
|
||||
annotationError: charts[chartKey].annotationError,
|
||||
annotationQuery: charts[chartKey].annotationQuery,
|
||||
annotationError: chart.annotationError,
|
||||
annotationQuery: chart.annotationQuery,
|
||||
vizType: explore.controls.viz_type.value,
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue