Skip to content

Commit

Permalink
fix(dashboard): check dashboard id before calling redux methods (#15921)
Browse files Browse the repository at this point in the history
* check dashboard id before calling redux methods

* comment
  • Loading branch information
suddjian committed Jul 28, 2021
1 parent 7b0acc4 commit ac9c137
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions superset-frontend/src/dashboard/components/Dashboard.jsx
Expand Up @@ -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,
Expand Down

0 comments on commit ac9c137

Please sign in to comment.