1
0
mirror of https://github.com/svg/svgo.git synced 2025-07-31 07:44:22 +03:00

plugins/moveElemsAttrsToGroup: fix inheitable only attrs array (fix #47)

This commit is contained in:
deepsweet
2012-11-23 18:11:21 +04:00
parent 88121c7723
commit 87cdc92b37
10 changed files with 59 additions and 33 deletions

View File

@ -1,4 +1,4 @@
var nonInheritedAttrs = require('./_collections').nonInheritedAttrs;
var inheritableAttrs = require('./_collections').inheritableAttrs;
/**
* Collapse content's intersected and inheritable
@ -85,7 +85,7 @@ function intersectInheritableAttrs(a, b) {
for (var n in a) {
if (
b.hasOwnProperty(n) &&
nonInheritedAttrs.indexOf(n) === -1 &&
inheritableAttrs.indexOf(n) > -1 &&
a[n].name === b[n].name &&
a[n].value === b[n].value &&
a[n].prefix === b[n].prefix &&