mirror of
https://github.com/apache/superset.git
synced 2024-09-18 19:49:37 -04:00
Add check for invalid color scheme (#6828)
* add check for invalid scheme * revert package-lock.json * revert again
This commit is contained in:
parent
e14c0cf9a3
commit
1c090df4a5
@ -71,9 +71,10 @@ export default class ColorSchemeControl extends React.PureComponent {
|
|||||||
// For categorical scheme, display all the colors
|
// For categorical scheme, display all the colors
|
||||||
// For sequential scheme, show 10 or interpolate to 10.
|
// For sequential scheme, show 10 or interpolate to 10.
|
||||||
// Sequential schemes usually have at most 10 colors.
|
// Sequential schemes usually have at most 10 colors.
|
||||||
const colors = isLinear
|
let colors = [];
|
||||||
? currentScheme.getColors(10)
|
if (currentScheme) {
|
||||||
: currentScheme.colors;
|
colors = isLinear ? currentScheme.getColors(10) : currentScheme.colors;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ul className="color-scheme-container">
|
<ul className="color-scheme-container">
|
||||||
|
Loading…
Reference in New Issue
Block a user