Skip to content

Commit

Permalink
Fix clipPath in node.js error fabricjs#5260 (fabricjs#5262)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSergey authored and asturur committed Sep 23, 2018
1 parent ef4aa2a commit 31bf417
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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:', ''));
});
});
Expand Down

0 comments on commit 31bf417

Please sign in to comment.