Skip to content

Commit

Permalink
Handle null parentNode from SVGInjector
Browse files Browse the repository at this point in the history
Credit to @apires for the idea in #13. See issues #12 and iconic/SVGInjector#32.
  • Loading branch information
tanem committed Dec 18, 2016
1 parent c66e593 commit e946dc2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ export default class ReactSVG extends PureComponent {
} = this.props

return (
<img
ref={img => this._img = img}
className={className}
data-src={path}
/>
<div>
<img
ref={img => this._img = img}
className={className}
data-src={path}
/>
</div>
)

}
Expand Down

0 comments on commit e946dc2

Please sign in to comment.