From 879696037d3f72bf6bbae710162a44bc92e64c20 Mon Sep 17 00:00:00 2001 From: Danilo Woznica Date: Thu, 20 Feb 2020 11:01:58 +0000 Subject: [PATCH] fix(native): creates the styles obj using assign (#183) closes #182 --- package.json | 2 +- src/native/Svg.tsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index d66d9559..4c1a5def 100755 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/native/Svg.tsx b/src/native/Svg.tsx index bfa1de60..66e50f13 100644 --- a/src/native/Svg.tsx +++ b/src/native/Svg.tsx @@ -79,8 +79,8 @@ class NativeSvg extends Component { 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 { delete props.speed return ( - +