diff --git a/src/components/avatar.jsx b/src/components/avatar.jsx index 2c841aff..f8544ba5 100644 --- a/src/components/avatar.jsx +++ b/src/components/avatar.jsx @@ -40,7 +40,7 @@ function Avatar({ url, size, alt = '', ...props }) { e.target.src = url; }} onLoad={(e) => { - avatarRef.current.dataset.loaded = true; + if (avatarRef.current) avatarRef.current.dataset.loaded = true; try { // Check if image has alpha channel const canvas = document.createElement('canvas');