Skip to content

Commit f624761

Browse files
committed
Bugfix for removing empty element-list/attributes
1 parent 3722a22 commit f624761

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ module.exports = function() {
1818
var p = parent.parent;
1919
// Delete elementList and/or attributes if empty
2020
var lastChild = p[p.length - 1];
21-
for (var i = 1; i < 3; i++) {
21+
for (var i = 2; i > 0; i--) {
2222
if (isEmpty(lastChild[i])) {
23-
delete lastChild[i];
23+
lastChild.splice(i, 1);
2424
}
2525
}
2626
delete parent.parent;

0 commit comments

Comments
 (0)