Fix clipPath in node.js error #5260 (#5262)

This commit is contained in:
Sergey 2018-09-24 00:54:38 +03:00 committed by Andrea Bogazzi
parent 3167154624
commit 6f9dbb981d

View file

@ -697,7 +697,8 @@
descendants.filter(function(el) {
return el.nodeName.replace('svg:', '') === 'clipPath';
}).forEach(function(el) {
clipPaths[el.id] = fabric.util.toArray(el.getElementsByTagName('*')).filter(function(el) {
var id = el.getAttribute('id');
clipPaths[id] = fabric.util.toArray(el.getElementsByTagName('*')).filter(function(el) {
return fabric.svgValidTagNamesRegEx.test(el.nodeName.replace('svg:', ''));
});
});