mirror of https://github.com/apache/superset.git
fix(dashboard): check dashboard id before calling redux methods (#15921)
* check dashboard id before calling redux methods * comment
This commit is contained in:
parent
7b0acc45de
commit
ac9c1372b4
|
@ -132,6 +132,11 @@ class Dashboard extends React.PureComponent {
|
|||
const currentChartIds = getChartIdsFromLayout(this.props.layout);
|
||||
const nextChartIds = getChartIdsFromLayout(nextProps.layout);
|
||||
|
||||
if (this.props.dashboardInfo.id !== nextProps.dashboardInfo.id) {
|
||||
// single-page-app navigation check
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentChartIds.length < nextChartIds.length) {
|
||||
const newChartIds = nextChartIds.filter(
|
||||
key => currentChartIds.indexOf(key) === -1,
|
||||
|
|
Loading…
Reference in New Issue