From 347a05765cd0c4636a34d81fb00019c4adeb2c0e Mon Sep 17 00:00:00 2001 From: Gary W <32130780+garywill@users.noreply.github.com> Date: Mon, 9 Dec 2019 05:55:35 +0000 Subject: [PATCH] fix currentCookieStoreId left undefined #1312 --- src/js/background/assignManager.js | 3 +++ test/features/assignment.test.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js/background/assignManager.js b/src/js/background/assignManager.js index d5aca773f..98508ebe0 100644 --- a/src/js/background/assignManager.js +++ b/src/js/background/assignManager.js @@ -490,6 +490,9 @@ const assignManager = { currentCookieStoreId = backgroundLogic.cookieStoreId(currentUserContextId); confirmUrl += `¤tCookieStoreId=${currentCookieStoreId}`; } + else { + currentCookieStoreId = "firefox-default"; + } browser.tabs.create({ url: confirmUrl, cookieStoreId: currentCookieStoreId, diff --git a/test/features/assignment.test.js b/test/features/assignment.test.js index 632c60b4d..08394e9d3 100644 --- a/test/features/assignment.test.js +++ b/test/features/assignment.test.js @@ -34,7 +34,7 @@ describe("Assignment Feature", () => { url: "moz-extension://multi-account-containers/confirm-page.html?" + `url=${encodeURIComponent(activeTab.url)}` + `&cookieStoreId=${activeTab.cookieStoreId}`, - cookieStoreId: undefined, + cookieStoreId: "firefox-default", openerTabId: null, index: 2, active: true