Skip to content

Commit f3d83a3

Browse files
refactor: use fallback for gradient value
1 parent ade5769 commit f3d83a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

assets/apps/components/src/Controls/ColorControl.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const ColorControl = ({
6666
{ 'allows-global': !disableGlobal },
6767
]);
6868

69-
const [gradient, setGradient] = useState(selectedColor || defaultGradient);
69+
const [gradient, setGradient] = useState(selectedColor);
7070
const isGradient = (value) => {
7171
return value && value.toLowerCase().indexOf('gradient') !== -1;
7272
};
@@ -166,7 +166,7 @@ const ColorControl = ({
166166
}}
167167
/>
168168
<GradientPicker
169-
value={gradient}
169+
value={gradient || defaultGradient}
170170
gradients={[]}
171171
onChange={(currentGradient) => {
172172
setGradient(currentGradient);

0 commit comments

Comments
 (0)