fix downloader reference

This commit is contained in:
martin-mfg
2025-09-21 14:54:43 +02:00
parent 62a70e94c0
commit 1f600d4876
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -33,7 +33,6 @@ const SvgInline = (props) => {
shadow.innerHTML = '';
// Insert SVG
const wrapper = document.createElement('div');
wrapper.id = 'svg-card';
wrapper.innerHTML = svg;
shadow.appendChild(wrapper);
}
@@ -47,7 +46,7 @@ const SvgInline = (props) => {
}
// Render a container div for the shadow DOM
return <div ref={containerRef} className={props.className} />;
return <div ref={containerRef} id="svgWrapper" className={props.className} />;
};
SvgInline.propTypes = {
@@ -17,7 +17,7 @@ const DisplayStage = ({ userId, themeSuffix }) => {
const downloadPNG = () => {
saveSvgAsPng(
document.getElementById('abc').shadowRoot.firstElementChild
document.getElementById('svgWrapper').shadowRoot.firstElementChild
.firstElementChild,
`${userId}_${card}.png`,
{