Skip to content

Commit e360cad

Browse files
themaartendomenic
authored andcommitted
Fix compiling sources ending with an end-of-line comment
Sources ending with an end-of-line comment (not followed by a newline character) aren't wrapped properly. The second part of the wrapper is treated as part of the comment in such a case. Adding a newline character in fixes this issue.
1 parent 7de12f3 commit e360cad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/sandboxed_module.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ SandboxedModule.prototype._getCompileInfo = function() {
257257
var source =
258258
'(function(global,' + localVariables.join(', ') + ') { ' +
259259
sourceToWrap +
260-
'});';
260+
'\n});';
261261

262262
return {source: source, parameters: localValues};
263263
};

0 commit comments

Comments
 (0)