Skip to content

Commit

Permalink
fix(eol): fix multiple return
Browse files Browse the repository at this point in the history
  • Loading branch information
mstruebing committed Feb 15, 2018
1 parent 3237ed6 commit f0ddb82
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/utils/line-ending-utils.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
const getEndOfLineChar = endOfLine => {
let eolChar = '';
if (endOfLine === 'lf') {
return '\n';
eolChar = '\n';
} else if (endOfLine === 'cr') {
return '\r';
eolChar = '\r';
} else if (endOfLine === 'crlf') {
return '\r\n';
eolChar = '\r\n';
}

return '';
return eolChar;
};

export default getEndOfLineChar;

0 comments on commit f0ddb82

Please sign in to comment.