mirror of
https://github.com/svg/svgo.git
synced 2025-07-29 20:21:14 +03:00
Fix final sorting condition in ‘sortDefsChildren’
This commit is contained in:
@ -37,7 +37,7 @@ exports.fn = function(item) {
|
||||
if (lengthComparison !== 0) {
|
||||
return lengthComparison;
|
||||
}
|
||||
return a.elem > b.elem;
|
||||
return a.elem != b.elem ? a.elem > b.elem ? -1 : 1 : 0;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -19,13 +19,13 @@
|
||||
<defs>
|
||||
<circle id="e" fill="none" fill-rule="evenodd" cx="60" cy="60" r="50"/>
|
||||
<circle id="f" fill="none" fill-rule="evenodd" cx="60" cy="60" r="50"/>
|
||||
<path id="b" d="M0 0zM10 10zM20 20l10 10M30 0c10 0 20 10 20 20M30 30z"/>
|
||||
<path id="d" d="M 30,30 z"/>
|
||||
<text id="a">
|
||||
referenced text
|
||||
</text>
|
||||
<text id="c">
|
||||
referenced text
|
||||
</text>
|
||||
<path id="b" d="M0 0zM10 10zM20 20l10 10M30 0c10 0 20 10 20 20M30 30z"/>
|
||||
<path id="d" d="M 30,30 z"/>
|
||||
</defs>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 968 B After Width: | Height: | Size: 968 B |
Reference in New Issue
Block a user