Skip to content

Commit

Permalink
Unbreak attachmentOptions
Browse files Browse the repository at this point in the history
This check fails if attachmentOptions isn't set because it looks at options.attachmentOptions, which may be (and in my case is) undefined.
  • Loading branch information
goldibex committed Jul 25, 2014
1 parent 36bb0a2 commit f887bf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function MailListener(options) {
this.mailParserOptions.streamAttachments = true;
}
this.attachmentOptions = options.attachmentOptions || {};
this.attachmentOptions.directory = (options.attachmentOptions.directory ? options.attachmentOptions.directory : '');
this.attachmentOptions.directory = (this.attachmentOptions.directory ? this.attachmentOptions.directory : '');
this.imap = new Imap({
xoauth2: options.xoauth2,
user: options.username,
Expand Down

0 comments on commit f887bf6

Please sign in to comment.