From e99ecb5dd4960d40d2c468fbe3948104af228e09 Mon Sep 17 00:00:00 2001 From: acbabis Date: Tue, 24 Feb 2015 14:15:43 -0700 Subject: [PATCH] Works for no comments --- plugins/commentsOnly.js | 2 ++ 1 file changed, 2 insertions(+) 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 } } };