superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From christ...@apache.org
Subject [incubator-superset] branch lyftga updated: fix: do not save colors without a color scheme (#7347)
Date Mon, 22 Apr 2019 22:46:34 GMT
This is an automated email from the ASF dual-hosted git repository.

christine pushed a commit to branch lyftga
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/lyftga by this push:
     new 5f14b55  fix: do not save colors without a color scheme (#7347)
5f14b55 is described below

commit 5f14b559e214b994a28cca1df33b7e475988b17a
Author: Kim Truong <47833996+khtruong@users.noreply.github.com>
AuthorDate: Mon Apr 22 15:46:24 2019 -0700

    fix: do not save colors without a color scheme (#7347)
---
 superset/assets/src/dashboard/components/Header.jsx    | 2 +-
 superset/assets/src/dashboard/components/SaveModal.jsx | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/superset/assets/src/dashboard/components/Header.jsx b/superset/assets/src/dashboard/components/Header.jsx
index 92d3b1d..8f3f831 100644
--- a/superset/assets/src/dashboard/components/Header.jsx
+++ b/superset/assets/src/dashboard/components/Header.jsx
@@ -222,7 +222,7 @@ class Header extends React.PureComponent {
       colorScheme,
       colorNamespace,
     );
-    const labelColors = scale.getColorMap();
+    const labelColors = colorScheme ? scale.getColorMap() : {};
     const data = {
       positions,
       expanded_slices: expandedSlices,
diff --git a/superset/assets/src/dashboard/components/SaveModal.jsx b/superset/assets/src/dashboard/components/SaveModal.jsx
index 1873f0c..d926bc8 100644
--- a/superset/assets/src/dashboard/components/SaveModal.jsx
+++ b/superset/assets/src/dashboard/components/SaveModal.jsx
@@ -110,7 +110,7 @@ class SaveModal extends React.PureComponent {
       colorScheme,
       colorNamespace,
     );
-    const labelColors = scale.getColorMap();
+    const labelColors = colorScheme ? scale.getColorMap() : {};
     const data = {
       positions,
       css,


Mime
View raw message