You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by su...@apache.org on 2021/07/28 00:29:22 UTC
[superset] 01/01: check dashboard id before calling redux methods
This is an automated email from the ASF dual-hosted git repository.
suddjian pushed a commit to branch fix/dashboard-props-checking
in repository https://gitbox.apache.org/repos/asf/superset.git
commit e9604b4a29f5a5faf51b704d0000a3415a546ba6
Author: David Aaron Suddjian <aa...@gmail.com>
AuthorDate: Tue Jul 27 17:28:19 2021 -0700
check dashboard id before calling redux methods
---
superset-frontend/src/dashboard/components/Dashboard.jsx | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/superset-frontend/src/dashboard/components/Dashboard.jsx b/superset-frontend/src/dashboard/components/Dashboard.jsx
index 4a5c883..2194ce1 100644
--- a/superset-frontend/src/dashboard/components/Dashboard.jsx
+++ b/superset-frontend/src/dashboard/components/Dashboard.jsx
@@ -132,6 +132,10 @@ class Dashboard extends React.PureComponent {
const currentChartIds = getChartIdsFromLayout(this.props.layout);
const nextChartIds = getChartIdsFromLayout(nextProps.layout);
+ if (this.props.dashboardInfo.id !== nextProps.dashboardInfo.id) {
+ return;
+ }
+
if (currentChartIds.length < nextChartIds.length) {
const newChartIds = nextChartIds.filter(
key => currentChartIds.indexOf(key) === -1,