Skip to content

Commit

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

* check dashboard id before calling redux methods

* comment
  • Loading branch information
suddjian authored and cccs-RyanS committed Dec 17, 2021
1 parent 4bed8fd commit 645080a
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 645080a

Please sign in to comment.