Closed alegag closed 3 years ago
Our Sentry often report error on color plugin "Cannot read property '1' of null".
Seems to occure when invalid rgb is passed as color to colorToHex function.
rgb
colorToHex
To avoid the issue, for the result of rgb.match(), if null, color was not decoded correctly, so returns transparent instead of using null as an array.
rgb.match()
null
transparent
Thank you for the fix :)
Our Sentry often report error on color plugin "Cannot read property '1' of null".
Seems to occure when invalid
rgb
is passed as color tocolorToHex
function.To avoid the issue, for the result of
rgb.match()
, ifnull
, color was not decoded correctly, so returnstransparent
instead of usingnull
as an array.