We're suffering from common issues updating to a value 0 on this library.
so we found some wrong operations in this project to achieve null-safety like below, but it now leads unintended behaviors.
const newValue = value || fallbackValue; // actual intention of a value can be 0, but the newValue cannot be updated to 0.
Recently, we've noticed that the user cannot update the gradient color position to 0 with the picker handle, and the root cause was here.
const handleGradient = (newColor: string, left?: number) => { // this left can be undefined.
const remaining = colors?.filter((c: ColorsProps) => !isUpperCase(c.value))
const newColors = [
{ value: newColor.toUpperCase(), left: left || currentLeft }, // but the left can be 0 as well.
...remaining,
]
createGradientStr(newColors)
}
Also we've found some more codes doing like this on the project. please fix it.
@artrointel @seungwan-woo this should be fixed in v3.0.11 I am going to close but if you find anymore issues or continue getting the behaviour please reopen.
We're suffering from common issues updating to a value 0 on this library. so we found some wrong operations in this project to achieve null-safety like below, but it now leads unintended behaviors.
Recently, we've noticed that the user cannot update the gradient color position to 0 with the picker handle, and the root cause was here.
Also we've found some more codes doing like this on the project. please fix it.