mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-23 17:16:26 +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;
|
e.target.src = url;
|
||||||
}}
|
}}
|
||||||
onLoad={(e) => {
|
onLoad={(e) => {
|
||||||
avatarRef.current.dataset.loaded = true;
|
if (avatarRef.current) avatarRef.current.dataset.loaded = true;
|
||||||
try {
|
try {
|
||||||
// Check if image has alpha channel
|
// Check if image has alpha channel
|
||||||
const canvas = document.createElement('canvas');
|
const canvas = document.createElement('canvas');
|
||||||
|
|
Loading…
Reference in a new issue