Skip to content

Commit

Permalink
fix(native): creates the styles obj using assign (#183)
Browse files Browse the repository at this point in the history
closes #182
  • Loading branch information
danilowoz authored Feb 20, 2020
1 parent b3ea38e commit 8796960
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
6 changes: 3 additions & 3 deletions src/native/Svg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,16 @@ 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
delete props.animate
delete props.speed

return (
<Svg style={composedStyle} {...props}>
<Svg style={svgStyle} {...props}>
<Rect
x="0"
y="0"
Expand Down

0 comments on commit 8796960

Please sign in to comment.