Merge pull request #222 from kleschenko/fix_buffers_completion

Fix buffers completion when there are some tabs with undefined title.
jh-changes
Shin'ya Ueoka 7 years ago committed by GitHub
commit 8361b70d0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/background/tabs.js

@ -51,7 +51,7 @@ const selectByKeyword = (current, keyword) => {
const getCompletions = (keyword) => {
return browser.tabs.query({ currentWindow: true }).then((tabs) => {
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;
});