Closed TKirahvi closed 5 years ago
RROR Error: Uncaught (in promise): TypeError: Cannot read property 'replace' of null TypeError: Cannot read property 'replace' of null at saveSvgAsPng.js:258
There is no transform attribute in my svg and still the code tries to get that attribute without null check. Fixed it with this:
if ( clone.getAttribute('transform') != null ) { clone.setAttribute('transform', clone.getAttribute('transform').replace(/translate\(.*?\)/, '')); }
Thanks! Just published v1.4.12 with your fix.
RROR Error: Uncaught (in promise): TypeError: Cannot read property 'replace' of null TypeError: Cannot read property 'replace' of null at saveSvgAsPng.js:258
There is no transform attribute in my svg and still the code tries to get that attribute without null check. Fixed it with this:
if ( clone.getAttribute('transform') != null ) { clone.setAttribute('transform', clone.getAttribute('transform').replace(/translate\(.*?\)/, '')); }