mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-19 02:51:14 +02:00
Merge pull request #217 from bitwarden/bugfix-no-attachments-error
Add null check when getting attachment from item
This commit is contained in:
commit
38ead1888c
@ -253,7 +253,7 @@ export class GetCommand {
|
||||
}
|
||||
|
||||
const cipher = await this.getCipherView(itemId);
|
||||
if (cipher == null || Array.isArray(cipher) || cipher.attachments.length === 0) {
|
||||
if (cipher == null || Array.isArray(cipher) || cipher.attachments == null || cipher.attachments.length === 0) {
|
||||
return Response.error('No attachments available for this item.');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user