diff --git a/editor/embedapi-dom.js b/editor/embedapi-dom.js index d214b478..8a0a7867 100644 --- a/editor/embedapi-dom.js +++ b/editor/embedapi-dom.js @@ -34,7 +34,7 @@ function exportPNG () { 'data:text/html;charset=utf-8,' + encodeURIComponent('' + str + '

' + str + '

'), 'svg-edit-exportWindow' ); - svgCanvas.rasterExport('PNG', null, exportWindow.name); + svgCanvas.rasterExport('PNG', null, exportWindow && exportWindow.name); }); } @@ -55,7 +55,7 @@ function exportPDF () { 'data:text/html;charset=utf-8,' + encodeURIComponent('' + str + '

' + str + '

'), 'svg-edit-exportWindow' ); - svgCanvas.exportPDF(exportWindow.name); + svgCanvas.exportPDF(exportWindow && exportWindow.name); }); }