Skip to content

Commit

Permalink
Moved used props out of spread for React 15.2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam L committed Jul 6, 2016
1 parent 8e83df6 commit 41eda25
Showing 1 changed file with 4 additions and 4 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 }} />
}
}

0 comments on commit 41eda25

Please sign in to comment.