Skip to content

Commit 1d585ec

Browse files
author
Ethan Veres
authored
fix: set crossOrigin prior to src (#31)
1 parent ee1fdfc commit 1d585ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/useImage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ export default function useImage(
4646

4747
if (typeof imageOrUrl === 'string') {
4848
image = new Image()
49-
image.src = imageOrUrl
5049
if (crossOrigin) image.crossOrigin = crossOrigin
50+
image.src = imageOrUrl
5151
} else {
5252
image = imageOrUrl
5353

0 commit comments

Comments
 (0)