From ac9c1372b42d8b64cf204faa88fe37a37bf0b06b Mon Sep 17 00:00:00 2001 From: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com> Date: Wed, 28 Jul 2021 13:45:09 -0700 Subject: [PATCH] fix(dashboard): check dashboard id before calling redux methods (#15921) * check dashboard id before calling redux methods * comment --- superset-frontend/src/dashboard/components/Dashboard.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/superset-frontend/src/dashboard/components/Dashboard.jsx b/superset-frontend/src/dashboard/components/Dashboard.jsx index 4a5c8831dc..21bd809e13 100644 --- a/superset-frontend/src/dashboard/components/Dashboard.jsx +++ b/superset-frontend/src/dashboard/components/Dashboard.jsx @@ -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,