Skip to content

Commit

Permalink
fixed removed.destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
leeluolee committed Aug 13, 2015
1 parent 562ff86 commit 00cf6d0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/regular.js
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,7 @@ walkers.list = function(ast, options){
function removeRange(index, rlen){
for(var j = 0; j< rlen; j++){ //removed
var removed = group.children.splice( index + 1, 1)[0];
removed.destroy(true);
if(removed) removed.destroy(true);
}
}
function addRange(index, end, newValue){
Expand Down
2 changes: 1 addition & 1 deletion dist/regular.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/walkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ walkers.list = function(ast, options){
function removeRange(index, rlen){
for(var j = 0; j< rlen; j++){ //removed
var removed = group.children.splice( index + 1, 1)[0];
removed.destroy(true);
if(removed) removed.destroy(true);
}
}
function addRange(index, end, newValue){
Expand Down
2 changes: 1 addition & 1 deletion test/regular.js
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@ walkers.list = function(ast, options){
function removeRange(index, rlen){
for(var j = 0; j< rlen; j++){ //removed
var removed = group.children.splice( index + 1, 1)[0];
removed.destroy(true);
if(removed) removed.destroy(true);
}
}
function addRange(index, end, newValue){
Expand Down

0 comments on commit 00cf6d0

Please sign in to comment.