1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-07-03 11:44:45 +02:00

still add no matching sites menu option when no site

This commit is contained in:
Kyle Spearrin 2016-10-14 00:22:39 -04:00
parent 9e2b64d0c4
commit a3398c675b

View File

@ -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,