Skip to content

Commit be802af

Browse files
committed
fix(#4): unnecessary appending to body
1 parent 8e288a4 commit be802af

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ export default (url) => {
2222
setSize([naturalWidth, naturalHeight]);
2323
});
2424
img.src = url;
25-
document.body.appendChild(img);
26-
return () => {
27-
img.parentNode.removeChild(img);
28-
};
2925
}, [url]);
3026

3127
return size;

0 commit comments

Comments
 (0)