Skip to content

Commit

Permalink
avatar: assign src after crossOrigin
Browse files Browse the repository at this point in the history
  • Loading branch information
chaance committed Feb 11, 2025
1 parent 082521a commit cde1b9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/avatar/src/avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ function useImageLoadingStatus(
setLoadingStatus('loading');
image.onload = updateStatus('loaded');
image.onerror = updateStatus('error');
image.src = src;
if (referrerPolicy) {
image.referrerPolicy = referrerPolicy;
}
if (typeof crossOrigin === 'string') {
image.crossOrigin = crossOrigin;
}
image.src = src;
return () => {
isMounted = false;
};
Expand Down

0 comments on commit cde1b9e

Please sign in to comment.