From 803dd46734e5f5ea6281cbafa7e40e79922be717 Mon Sep 17 00:00:00 2001 From: guybedford Date: Mon, 25 Nov 2013 14:50:53 +0200 Subject: [PATCH] update eval for debugging --- loader.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/loader.js b/loader.js index ea388adf..cb0f3eac 100644 --- a/loader.js +++ b/loader.js @@ -845,9 +845,9 @@ // carefully scoped eval with given global var __scopedEval = function(__source, global, __sourceURL, __sourceMappingURL) { - eval('with(global) { (function() { ' + __source + ' \n }).call(global); }' + (__sourceMappingURL - ? '\n//# sourceMappingURL=' + __sourceMappingURL - : (__sourceURL ? '\n//# sourceURL=' + __sourceURL : ''))); + eval('with(global) { (function() { ' + __source + ' \n }).call(global); }' + + (__sourceURL && !__source.match(/\/\/[@#] ?(sourceURL|sourceMappingURL)=(.+)/) + ? '\n//# sourceURL=' + __sourceURL : '')); } })();