diff --git a/content/treestyletab/bookmarksOverlay.js b/content/treestyletab/bookmarksOverlay.js index a456a3b8..c083e808 100644 --- a/content/treestyletab/bookmarksOverlay.js +++ b/content/treestyletab/bookmarksOverlay.js @@ -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()