change spread call expression context from null to undefined

This commit is contained in:
Sebastian McKenzie
2015-01-06 16:45:39 +11:00
parent 254424ced5
commit 7439247095
2 changed files with 3 additions and 3 deletions

View File

@@ -59,7 +59,7 @@ exports.CallExpression = function (node, parent, file, scope) {
var args = node.arguments;
if (!hasSpread(args)) return;
var contextLiteral = t.literal(null);
var contextLiteral = t.identifier("undefined");
node.arguments = [];
@@ -99,7 +99,7 @@ exports.NewExpression = function (node, parent, file) {
var args = node.arguments;
if (!hasSpread(args)) return;
var nativeType = t.isIdentifier(node.callee) && _.contains(t.NATIVE_TYPES_NAMES, node.callee.name);
var nativeType = t.isIdentifier(node.callee) && _.contains(t.NATIVE_TYPE_NAMES, node.callee.name);
var nodes = build(args, file);

View File

@@ -3,7 +3,7 @@ var _ = require("lodash");
var t = exports;
t.NATIVE_TYPES_NAMES = ["Array", "Object", "Number", "Boolean", "Date", "Array", "String"];
t.NATIVE_TYPE_NAMES = ["Array", "Object", "Number", "Boolean", "Date", "Array", "String"];
//