diff --git a/plugins/commentsOnly.js b/plugins/commentsOnly.js index a35e96f1..a605a629 100644 --- a/plugins/commentsOnly.js +++ b/plugins/commentsOnly.js @@ -13,6 +13,8 @@ exports.handlers = { var comments = e.source.match(/\/\*\*[\s\S]+?\*\//g); if (comments) { e.source = comments.join('\n\n'); + } else { + e.source = ''; // If file has no comments, parser should still receive no code } } };