念のため最後にもう一度-1より小さい値を除去

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@6520 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2010-03-29 23:47:38 +00:00
parent 764ab3b27d
commit bbdbfd176f

View File

@ -146,7 +146,11 @@ var TreeStyleTabBookmarksService = {
}
return aPosition - offset;
});
return treeStructure;
// smaller than -1 (-2, etc.) are invalid values.
return treeStructure.map(function(aIndex) {
return aIndex < -1 ? aDefaultParentID : aIndex ;
}, this);
},
// based on PlacesUtils.getURLsForContainerNode()