Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
[fixed] small formatting issues in commentsOnly.js
Browse files Browse the repository at this point in the history
  • Loading branch information
thealjey committed Jan 30, 2017
1 parent 6c703b5 commit 33a0c97
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions commentsOnly.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,9 @@ exports.handlers = {
}
const comments = source.match(cmt);

if (!comments) {
e.source = source.replace(notN, '');

return;
}

e.source = source.split(cmt).reduce((result, source, i) => result + source.replace(notN, '') + comments[i], '');
e.source = comments
? source.split(cmt).reduce((res, src, i) => res + src.replace(notN, '') + comments[i], '')
: source.replace(notN, '');
}

};

0 comments on commit 33a0c97

Please sign in to comment.