mirror of
https://github.com/zhigang1992/devhub.git
synced 2026-06-13 17:16:23 +08:00
Prevent rgba error on theme change
TODO: Fix this for real
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user