diff --git a/content/treestyletab/bookmarksOverlay.js b/content/treestyletab/bookmarksOverlay.js index 430d683b..a456a3b8 100644 --- a/content/treestyletab/bookmarksOverlay.js +++ b/content/treestyletab/bookmarksOverlay.js @@ -111,7 +111,7 @@ var TreeStyleTabBookmarksService = { var treeStructure = aIDs.map(function(aId, aIndex) { let id = this.getParentItem(aId); let index = aIDs.indexOf(id); - return index >= aIndex ? aDefaultParentID : index ; + return index > aIndex || index < -1 ? aDefaultParentID : index ; }, this); /* Correct patterns like: