Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
toSVG(filepath: ?string): Promise {
if (reactElement === null) {
throw 'Cannot call toSVG on a destroyed pileup';
}
return htmlToImage.toSvgDataURL(el)
.then(function (svg) {
if (filepath != null) {
window.saveAs(svg, filepath);
}
return svg;
});
},
destroy(): void {