don't raise "undefined" error

This commit is contained in:
Piro / SHIMODA Hiroshi 2011-12-10 02:37:41 +09:00
parent 80b64709c7
commit d0dd08f88d

View File

@ -134,7 +134,9 @@ function getOwnerTabBrowser()
function getOwnerTab(aWindow) function getOwnerTab(aWindow)
{ {
var gBrowser = getOwnerTabBrowser(); var gBrowser = getOwnerTabBrowser();
return gBrowser && gBrowser.treeStyleTab.getTabFromFrame(aWindow || window); return gBrowser &&
gBrowser.treeStyleTab &&
gBrowser.treeStyleTab.getTabFromFrame(aWindow || window);
} }
function getTabById(aId) function getTabById(aId)