mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
don't draw if image not present
This commit is contained in:
parent
f3ae7a8506
commit
1ca56204b1
1 changed files with 9 additions and 8 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue