mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-23 09:06:23 +01:00
Check if undefined
This commit is contained in:
parent
348ceedced
commit
3d3d963a42
1 changed files with 1 additions and 1 deletions
|
@ -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');
|
||||
|
|
Loading…
Reference in a new issue