Merge pull request #500 from yueyuzhao/issue/499-stamp-camera-fill

Fix clone svg element null pointer
This commit is contained in:
chrisgarrity 2021-08-24 14:27:23 -04:00 committed by GitHub
commit 8ab40eb646
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -805,6 +805,9 @@ export default class SVGTools {
var g = SVGTools.createGroup(p, getIdFor('group'));
for (var i = 0; i < elem.childElementCount; i++) {
var shape = SVGTools.getClonedElement(g, elem.childNodes[i]);
if (!shape) {
continue;
}
old.push(elem.childNodes[i].id);
newlist.push(shape.id);
if (elem.childNodes[i].getAttribute('id').indexOf('Border') > -1) {