From 2756201060fab8fc580d49c8d540fefc0a7098c1 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Mon, 8 Dec 2008 13:25:07 +1100 Subject: [PATCH] always return a value from tabs.getContentIndex --- common/content/tabs.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/common/content/tabs.js b/common/content/tabs.js index 89407d1f..2ff4e533 100644 --- a/common/content/tabs.js +++ b/common/content/tabs.js @@ -707,11 +707,10 @@ function Tabs() //{{{ { for (let [i, browser] in this.browsers) { - if (browser.contentWindow == content) - return i; - if (browser.contentDocument == content) + if (browser.contentWindow == content || browser.contentDocument == content) return i; } + return -1; }, getTab: function (index)