From 3ec97fc86da9968f492d7c9ee29ee46db9e46456 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 6 Jan 2015 10:39:18 +1100 Subject: [PATCH] only check if a function is a declaration in common module hoisting --- lib/6to5/transformation/modules/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/6to5/transformation/modules/common.js b/lib/6to5/transformation/modules/common.js index c577052740..77224cd148 100644 --- a/lib/6to5/transformation/modules/common.js +++ b/lib/6to5/transformation/modules/common.js @@ -71,7 +71,7 @@ CommonJSFormatter.prototype.exportDeclaration = function (node, nodes) { // exports = module.exports = VALUE; if (this.hasNonDefaultExports) templateName = "exports-default-module-override"; - if (t.isFunction(declar) || !this.hasNonDefaultExports) { + if (t.isFunctionDeclaration(declar) || !this.hasNonDefaultExports) { assign = util.template(templateName, { VALUE: this._pushStatement(declar, nodes) }, true);