summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-01-30 14:06:43 -0500
committerGitHub <noreply@github.com>2021-01-30 14:06:43 -0500
commit0ba1427775f0e5e746c11dde8b22e827a60745de (patch)
tree260b01cf89ed4134275976cbb4af31ee82bcdb8d
parentba8b02cda578d7feabb18fd6e0110887cb956133 (diff)
Fix null not being handled properly in _findTab result (#1331)
-rw-r--r--ext/bg/js/backend.js2
1 files changed, 1 insertions, 1 deletions
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 {