throw error when object is empty

This commit is contained in:
casperlamboo 2017-12-21 11:16:49 +01:00
parent 0e6fd5fb1c
commit e3cda119ce

View File

@ -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);