We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 43bbd33 commit f157d72Copy full SHA for f157d72
src/components/svgImage/index.web.tsx
@@ -14,13 +14,12 @@ export interface SvgImageProps {
14
}
15
16
function SvgImage(props: SvgImageProps) {
17
- const {data, style, tintColor, ...others} = props;
18
-
19
- const styleObj = Object.assign({}, ...(style || []));
20
+ const {data, style = {}, tintColor, ...others} = props;
21
const [svgStyleCss, setSvgStyleCss] = useState<string>(EMPTY_STYLE);
22
const [postCssStyleCalled, setPostCssStyleCalled] = useState(false);
23
+ const styleObj = JSON.parse(JSON.stringify(style));
+
24
const createStyleSvgCss = async (PostCssPackage: {postcss: any; cssjs: any}) => {
25
setPostCssStyleCalled(true);
26
const {postcss, cssjs} = PostCssPackage;
0 commit comments