mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -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 sequential scheme, show 10 or interpolate to 10.
|
||||
// Sequential schemes usually have at most 10 colors.
|
||||
const colors = isLinear
|
||||
? currentScheme.getColors(10)
|
||||
: currentScheme.colors;
|
||||
let colors = [];
|
||||
if (currentScheme) {
|
||||
colors = isLinear ? currentScheme.getColors(10) : currentScheme.colors;
|
||||
}
|
||||
|
||||
return (
|
||||
<ul className="color-scheme-container">
|
||||
|
Loading…
Reference in New Issue
Block a user