don't draw if image not present
This commit is contained in:
parent
f3ae7a8506
commit
1ca56204b1
@ -301,14 +301,15 @@ const drawElementOnCanvas = (
|
||||
customElementImgCache[img.id] = img;
|
||||
}
|
||||
}
|
||||
context.drawImage(
|
||||
customElementImgCache[element.id],
|
||||
0,
|
||||
0,
|
||||
element.width,
|
||||
element.height,
|
||||
);
|
||||
|
||||
if (customElementImgCache[element.id]) {
|
||||
context.drawImage(
|
||||
customElementImgCache[element.id],
|
||||
0,
|
||||
0,
|
||||
element.width,
|
||||
element.height,
|
||||
);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user