mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-04 23:54:53 +00:00
Update "color" dep to 2.x to fix RN minifier bug
There's a bug with the version of UglifyJS that RN/Metro uses which causes an error about "e.length" inside of "color" that was fixed in 2.x. One change to "color" is that `rgbaArray()` was removed and now the call is `rgb().array()`.
This commit is contained in:
@@ -13,7 +13,7 @@ export default function (colorOrBrush) {
|
||||
return [1, matched[1]];
|
||||
//todo:
|
||||
} else { // solid color
|
||||
let c = new Color(colorOrBrush).rgbaArray();
|
||||
let c = Color(colorOrBrush).rgb().array();
|
||||
return [0, c[0] / 255, c[1] / 255, c[2] / 255, c[3]];
|
||||
}
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user