受け取ったタブの配列をクリーンアップしてから使う

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@4858 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-07-31 06:39:17 +00:00
parent 4bdab99af8
commit f1801d266f

View File

@ -14,10 +14,12 @@ var TreeStyleTabBookmarksService = {
beginAddBookmarksFromTabs : function(aTabs) /* PUBLIC API */ beginAddBookmarksFromTabs : function(aTabs) /* PUBLIC API */
{ {
this._addingBookmarks = []; this._addingBookmarks = [];
this._addingBookmarkTreeStructure = aTabs.map(function(aTab) { this._addingBookmarkTreeStructure = TreeStyleTabService
var parent = TreeStyleTabService.getParentTab(aTab); .cleanUpTabsArray(aTabs)
return aTabs.indexOf(parent); .map(function(aTab) {
}, this); var parent = TreeStyleTabService.getParentTab(aTab);
return aTabs.indexOf(parent);
}, this);
this.BookmarksService.addObserver(this, false); this.BookmarksService.addObserver(this, false);
}, },