diff --git a/src/utils/exportUtils.js b/src/utils/exportUtils.js index 3f8e006..cdff11b 100644 --- a/src/utils/exportUtils.js +++ b/src/utils/exportUtils.js @@ -83,6 +83,10 @@ export function generateExportMesh(state, options = {}) { exportState.objectsById[id] = exportShapeData; } + if (Object.keys(exportState.objectsById).length === 0) { + throw new Error('sketch is empty'); + } + const shapesManager = new ShapesManager({ toonShader: false }); shapesManager.update(exportState);