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:
James Ide
2017-11-09 12:28:13 -08:00
parent a958668e7f
commit 235e132baf
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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) {