Check for color knob value existence before applying uppercase

This commit is contained in:
Charles Lehnert 2019-04-23 17:40:24 -04:00
parent c6d704225e
commit 9f2706d290

View File

@ -82,7 +82,6 @@ class ColorType extends React.Component {
const colorStyle = {
background: knob.value,
};
return (
<ColorButton
active={displayColorPicker}
@ -91,7 +90,7 @@ class ColorType extends React.Component {
onClick={this.handleClick}
size="flex"
>
{knob.value.toUpperCase()}
{knob.value && knob.value.toUpperCase()}
<Swatch style={colorStyle} />
{displayColorPicker ? (
<Popover