From a6c69b41be27b764e88d0fc18dfac0ab854416ee Mon Sep 17 00:00:00 2001 From: Geoff Lankow Date: Tue, 16 Aug 2022 14:16:30 +1200 Subject: [PATCH] Bug 1780963 - Fix glodaFacetTabType.openTab when aArgs is given but empty. r=#thunderbird-reviewers,mkmelin Since bug 1752038, aArgs is an empty object instead of undefined when the global search menu item is used. Differential Revision: https://phabricator.services.mozilla.com/D154761 --HG-- extra : amend_source : cf5a75b9889415abc1d7be7a88c80c7fb1e22d51 --- mail/base/content/glodaFacetTab.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mail/base/content/glodaFacetTab.js b/mail/base/content/glodaFacetTab.js index 7e2a27864f..f194b2c24b 100644 --- a/mail/base/content/glodaFacetTab.js +++ b/mail/base/content/glodaFacetTab.js @@ -22,8 +22,8 @@ var glodaFacetTabType = { }, }, openTab(aTab, aArgs) { - // If aArgs is omitted, default to a blank user search. - if (!aArgs) { + // If aArgs is empty, default to a blank user search. + if (!Object.keys(aArgs).length) { aArgs = { searcher: new GlodaMsgSearcher(null, "") }; } // we have no browser until our XUL document loads