From 0ba1427775f0e5e746c11dde8b22e827a60745de Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 30 Jan 2021 14:06:43 -0500 Subject: Fix null not being handled properly in _findTab result (#1331) --- ext/bg/js/backend.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext') diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js index b0648ac5..4a3b7663 100644 --- a/ext/bg/js/backend.js +++ b/ext/bg/js/backend.js @@ -1809,7 +1809,7 @@ class Backend { switch (mode) { case 'existingOrNewTab': if (useSettingsV2) { - const tab = await this._findTab(1000, (url2) => url2.startsWith(url)); + const tab = await this._findTab(1000, (url2) => (url2 !== null && url2.startsWith(url))); if (tab !== null) { await this._focusTab(tab); } else { -- cgit v1.2.3