diff --git a/lib/6to5/file.js b/lib/6to5/file.js index 2fcb5012ec..b1fc6733c5 100644 --- a/lib/6to5/file.js +++ b/lib/6to5/file.js @@ -95,20 +95,22 @@ File.prototype.generate = function () { var ast = this.ast; var result = util.generate(ast, opts); + var code = result.code; if (this.shebang) { // add back shebang - result.code = this.shebang + result.code; + code = this.shebang + code; } if (opts.sourceMap === "inline") { - result.code += "\n" + util.sourceMapToComment(result.map); + code += "\n" + util.sourceMapToComment(map); } - result.map = result.map || null; - result.ast = ast; - - return result; + return { + code: code, + map: result.map || null, + ast: ast + }; }; File.prototype.generateUid = function (name) {