From 5a842ab623b1ddb1fa1752ebfc2a3fa3c6b873b9 Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Mon, 9 Feb 2015 17:34:59 +0200 Subject: [PATCH] Fix statement substitution in templates. --- lib/6to5/util.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/6to5/util.js b/lib/6to5/util.js index 5afe1e97e1..3b0eb565c5 100644 --- a/lib/6to5/util.js +++ b/lib/6to5/util.js @@ -84,6 +84,9 @@ exports.sourceMapToComment = function (map) { var templateVisitor = { enter: function (node, parent, scope, nodes) { + if (t.isExpressionStatement(node)) { + node = node.expression; + } if (t.isIdentifier(node) && has(nodes, node.name)) { return nodes[node.name]; }