From 6ad03bdaff6ca7f7f25d37c560f5526240c339a4 Mon Sep 17 00:00:00 2001 From: Chris Cowan Date: Mon, 12 Dec 2016 19:06:21 -0800 Subject: [PATCH] Put newline in eval check so end // comments don't trip the check. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 9048d77..ca1d05f 100644 --- a/index.js +++ b/index.js @@ -10,7 +10,7 @@ module.exports = function (src, file) { if (typeof src !== 'string') src = String(src); try { - eval('throw "STOP"; (function () { ' + src + '})()'); + eval('throw "STOP"; (function () { ' + src + '\n})()'); return; } catch (err) {