|
|
@ -87,7 +87,7 @@ const selectAt = (index) => { |
|
|
|
const selectByKeyword = (current, keyword) => { |
|
|
|
const selectByKeyword = (current, keyword) => { |
|
|
|
return browser.tabs.query({ currentWindow: true }).then((tabs) => { |
|
|
|
return browser.tabs.query({ currentWindow: true }).then((tabs) => { |
|
|
|
let matched = tabs.filter((t) => { |
|
|
|
let matched = tabs.filter((t) => { |
|
|
|
return t.url.includes(keyword) || t.title.includes(keyword); |
|
|
|
return t.url.includes(keyword) || t.title && t.title.includes(keyword); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (matched.length === 0) { |
|
|
|
if (matched.length === 0) { |
|
|
|