fix(native): creates the styles obj using assign (#183)

closes #182
This commit is contained in:
Danilo Woznica
2020-02-20 11:01:58 +00:00
committed by GitHub
parent b3ea38e4e7
commit 879696037d
2 changed files with 4 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "react-content-loader",
"version": "4.4.2",
"version": "5.0.1",
"description": "SVG-Powered component to easily create placeholder loadings (like Facebook cards loading)",
"repository": {
"type": "git",

View File

@@ -79,8 +79,8 @@ class NativeSvg extends Component<IContentLoaderProps, { offset: number }> {
const offset2 = offsetValueBound(this.state.offset)
const offset3 = offsetValueBound(this.state.offset + 1)
const rtlStyle = rtl ? { transform: [{ rotateY: '180deg' }] } : {}
const composedStyle = Object.assign(style, rtlStyle)
const rtlStyle: object = rtl ? { transform: [{ rotateY: '180deg' }] } : {}
const svgStyle = Object.assign(Object.assign({}, style), rtlStyle)
// Remove unnecessary keys
delete props.uniqueKey
@@ -88,7 +88,7 @@ class NativeSvg extends Component<IContentLoaderProps, { offset: number }> {
delete props.speed
return (
<Svg style={composedStyle} {...props}>
<Svg style={svgStyle} {...props}>
<Rect
x="0"
y="0"