fix empty whitelist in build-external-helpers - fixes #1129

This commit is contained in:
Sebastian McKenzie
2015-04-03 04:39:39 +11:00
parent c60f3f0e34
commit c6c0bc07e2
2 changed files with 8 additions and 2 deletions

View File

@@ -50,9 +50,9 @@ function buildVar(namespace, builder) {
return t.program(body);
}
function buildHelpers(body, namespace, whitelist = []) {
function buildHelpers(body, namespace, whitelist) {
each(File.helpers, function (name) {
if (whitelist.length && whitelist.indexOf(name) === -1) return;
if (whitelist && whitelist.indexOf(name) === -1) return;
var key = t.identifier(t.toIdentifier(name));
body.push(t.expressionStatement(