Prevent rgba error on theme change

TODO: Fix this for real
This commit is contained in:
Bruno Lemos
2019-01-20 21:07:36 -02:00
parent 4d29578194
commit 040f839f64

View File

@@ -84,10 +84,17 @@ class GradientLayerOverlay extends React.Component<GradientLayerOverlayProps> {
if (!color) return null
let colors
try {
colors = [rgba(color, 0), rgba(color, 0.5)]
} catch (e) {
return null
}
return (
<SpringAnimatedLinearGradient
collapsable={false}
colors={[rgba(color, 0), rgba(color, 0.5)]}
colors={colors}
pointerEvents="box-none"
style={[
getStyle(to, size, spacing),