From a3398c675bd0f1013fac97aecd451631272fea5d Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 14 Oct 2016 00:22:39 -0400 Subject: [PATCH] still add no matching sites menu option when no site --- src/background.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/background.js b/src/background.js index 5274dbebbd..c4e7965ecf 100644 --- a/src/background.js +++ b/src/background.js @@ -346,7 +346,7 @@ function loadNoSitesContextMenuOptions() { } function loadContextMenuOptions(title, idSuffix, site) { - if (site.password && site.password !== '') { + if (!site || (site.password && site.password !== '')) { chrome.contextMenus.create({ type: 'normal', id: 'autofill_' + idSuffix, @@ -356,7 +356,7 @@ function loadContextMenuOptions(title, idSuffix, site) { }); } - if (site.username && site.username !== '') { + if (!site || (site.username && site.username !== '')) { chrome.contextMenus.create({ type: 'normal', id: 'copy-username_' + idSuffix, @@ -366,7 +366,7 @@ function loadContextMenuOptions(title, idSuffix, site) { }); } - if (site.password && site.password !== '') { + if (!site || (site.password && site.password !== '')) { chrome.contextMenus.create({ type: 'normal', id: 'copy-password_' + idSuffix,