Skip to content

Commit

Permalink
Merge pull request #9 from seethroughtrees/master
Browse files Browse the repository at this point in the history
Moved used props out of spread for React 15.2.x
  • Loading branch information
Jaeho Lee authored Jul 7, 2016
2 parents 8e83df6 + 23fd89c commit dbdebcc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import React from 'react';
const DOMParser = typeof window !== 'undefined' && window.DOMParser;
const process = process || {};
process.env = process.env || {};
const parserAvailable = typeof DOMParser !== 'undefined' &&
DOMParser.prototype != null &&
const parserAvailable = typeof DOMParser !== 'undefined' &&
DOMParser.prototype != null &&
DOMParser.prototype.parseFromString != null;

if ("production" !== process.env.NODE_ENV && !parserAvailable) {
Expand Down Expand Up @@ -80,7 +80,7 @@ export default class InlineSVG extends React.Component {

render() {
let Element, __html, svgProps;
const { element, raw, src } = this.props;
const { element, raw, src, ...otherProps } = this.props;

if (raw === true && isParsable(src)) {
Element = 'svg';
Expand All @@ -91,7 +91,7 @@ export default class InlineSVG extends React.Component {
Element = Element || element;
svgProps = svgProps || {};

return <Element {...svgProps} {...this.props} src={null} children={null}
return <Element {...svgProps} {...otherProps} src={null} children={null}
dangerouslySetInnerHTML={{ __html }} />
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "svg-inline-react",
"version": "1.0.1",
"version": "1.0.2",
"description": "Inline SVG wrapper component for React",
"main": "dist/index.js",
"jsnext:main": "es/index.js",
Expand Down Expand Up @@ -31,7 +31,7 @@
},
"homepage": "https://github.com/sairion/svg-inline-react",
"peerDependencies": {
"react": "^0.14.0 || ^15.0.0-rc.1"
"react": "^0.14.0 || ^15.0.0"
},
"devDependencies": {
"babel": "^5.8.34",
Expand Down

0 comments on commit dbdebcc

Please sign in to comment.