mirror of
https://github.com/excalidraw/excalidraw
synced 2025-07-25 13:58:22 +08:00
prevent exporting empty canvas
This commit is contained in:
@ -34,6 +34,8 @@ function exportAsPNG({
|
|||||||
exportVisibleOnly,
|
exportVisibleOnly,
|
||||||
exportPadding = 10
|
exportPadding = 10
|
||||||
}) {
|
}) {
|
||||||
|
if ( !elements.length ) return window.alert("Cannot export empty canvas.");
|
||||||
|
|
||||||
// deselect & rerender
|
// deselect & rerender
|
||||||
|
|
||||||
clearSelection();
|
clearSelection();
|
||||||
|
Reference in New Issue
Block a user