1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

Add null check when getting attachment from item

This commit is contained in:
Thomas Rittson 2021-01-20 06:39:18 +10:00
parent 998e07d897
commit 8dd55dc80f

View File

@ -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.');
}