Skip to content

Commit

Permalink
Fixed small issue with IMAP uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Nov 10, 2024
1 parent 86c2c02 commit 2de9bf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/email-client/imap-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ class IMAPClient extends BaseClient {
}

async packUid(mailbox, uid) {
if (isNaN(uid)) {
if (isNaN(uid) || !mailbox) {
return false;
}

Expand Down Expand Up @@ -1768,7 +1768,7 @@ class IMAPClient extends BaseClient {
}

if (uploadResponse.uid) {
response.id = await this.packUid(uploadResponse.path, uploadResponse.uid);
response.id = await this.packUid(uploadResponse.path || data.path, uploadResponse.uid);
}

response.path = uploadResponse.path;
Expand Down

0 comments on commit 2de9bf9

Please sign in to comment.