From 8c40db565888c4c3e6fa00af4940db9182ba42b1 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Sun, 9 Nov 2014 16:27:39 +1100 Subject: [PATCH] use Program builder --- lib/6to5/runtime.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/6to5/runtime.js b/lib/6to5/runtime.js index ee77d65c60..5fa34fc7c5 100644 --- a/lib/6to5/runtime.js +++ b/lib/6to5/runtime.js @@ -8,10 +8,7 @@ module.exports = function (namespace) { var body = []; var container = t.functionExpression(null, [], t.blockStatement(body)); - var tree = { - type: "Program", - body: [t.expressionStatement(t.callExpression(container, []))] - }; + var tree = t.program([t.expressionStatement(t.callExpression(container, []))]); body.push(t.variableDeclaration("var", [ t.variableDeclarator(t.identifier("self"), t.conditionalExpression(