Skip to content

Commit ef9d172

Browse files
author
tanem
committed
Use div instead of img
1 parent c7352a3 commit ef9d172

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@ export default class ReactSVG extends Component {
4545
const div = document.createElement('div')
4646
div.innerHTML = ReactDOMServer.renderToStaticMarkup(
4747
<div>
48-
<img
48+
<div
4949
className={className}
5050
data-src={path}
5151
style={style}
5252
/>
5353
</div>
5454
)
5555

56-
const imgWrapper = this.container.appendChild(div.firstChild)
56+
const wrapper = this.container.appendChild(div.firstChild)
5757

58-
SVGInjector(imgWrapper.firstChild, {
58+
SVGInjector(wrapper.firstChild, {
5959
evalScripts,
6060
each
6161
})

0 commit comments

Comments
 (0)