diff --git a/src/background/contextMenus.background.ts b/src/background/contextMenus.background.ts index a9173f2dfe..609081b2b7 100644 --- a/src/background/contextMenus.background.ts +++ b/src/background/contextMenus.background.ts @@ -80,8 +80,16 @@ export default class ContextMenusBackground { return; } - const ciphers = await this.cipherService.getAllDecrypted(); - const cipher = ciphers.find(c => c.id === id); + let cipher: CipherView; + if (id === 'noop') { + const ciphers = await this.cipherService.getAllDecryptedForUrl(tab.url); + cipher = ciphers.length > 0 ? ciphers[0] : null; + } + else { + const ciphers = await this.cipherService.getAllDecrypted(); + cipher = ciphers.find(c => c.id === id); + } + if (cipher == null) { return; }