Check title null

This commit is contained in:
Shin'ya Ueoka 2018-05-30 21:38:01 +09:00
parent 982a54c0aa
commit e286aab3d7

View file

@ -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) {