Fix buffers completion when there are some tabs with undefined title.
This commit is contained in:
parent
507c5b4f78
commit
cc539d96bc
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ const selectByKeyword = (current, keyword) => {
|
||||||
const getCompletions = (keyword) => {
|
const getCompletions = (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);
|
||||||
});
|
});
|
||||||
return matched;
|
return matched;
|
||||||
});
|
});
|
||||||
|
|
Reference in a new issue