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,6 +301,7 @@ const drawElementOnCanvas = (
|
||||||
customElementImgCache[img.id] = img;
|
customElementImgCache[img.id] = img;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (customElementImgCache[element.id]) {
|
||||||
context.drawImage(
|
context.drawImage(
|
||||||
customElementImgCache[element.id],
|
customElementImgCache[element.id],
|
||||||
0,
|
0,
|
||||||
|
@ -308,7 +309,7 @@ const drawElementOnCanvas = (
|
||||||
element.width,
|
element.width,
|
||||||
element.height,
|
element.height,
|
||||||
);
|
);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue