Skip to content

Commit

Permalink
fix conditional block style
Browse files Browse the repository at this point in the history
- The logical operators must go at the end of the statement before the
  line break, instead of putting them in the beginning of the next line;
- The else statement must start in a new line;
  • Loading branch information
spelcaster authored and Hugo Augusto Freitas do Carmo committed Oct 30, 2017
1 parent 316f93f commit 78609a3
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions packages/helpers/classes/attachment.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,20 @@ class Attachment {

if (contentType === 'undefined') {
return;
} else if (contentType === 'object'
&& content.hasOwnProperty('type')
&& (content.type === 'Buffer')
}
else if (contentType === 'object' &&
content.hasOwnProperty('type') &&
(content.type === 'Buffer')
) {
const buff = new Buffer(content.data);
this.content = buff.toString('base64');
return;
} else if (content instanceof Buffer) {
}
else if (content instanceof Buffer) {
this.content = content.toString('base64');
return;
} else if (contentType !== 'string') {
}
else if (contentType !== 'string') {
throw new Error('String expected for `content`');
}

Expand Down

0 comments on commit 78609a3

Please sign in to comment.