From 429d3f5017a4179734e20464e520b50137c7b128 Mon Sep 17 00:00:00 2001 From: gorhill Date: Fri, 23 Oct 2015 12:58:54 -0400 Subject: [PATCH] code review: not all windows have tabs --- platform/firefox/vapi-background.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index 566dd1a7a..37245d8e3 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -789,6 +789,11 @@ vAPI.tabs.getAll = function(window) { continue; } + // This can happens if a tab-less window is currently opened. + if ( !tabBrowser.tabs ) { + continue; + } + for ( tab of tabBrowser.tabs ) { tabs.push(tab); }