fix spread binding with the wrong context
This commit is contained in:
parent
9bc67c28e3
commit
07646475d9
@ -107,13 +107,9 @@ export function NewExpression(node, parent, scope, file) {
|
||||
|
||||
var nodes = build(args, scope);
|
||||
|
||||
var first = nodes.shift();
|
||||
var context = t.arrayExpression([t.literal(null)]);
|
||||
|
||||
if (nodes.length) {
|
||||
args = t.callExpression(t.memberExpression(first, t.identifier("concat")), nodes);
|
||||
} else {
|
||||
args = first;
|
||||
}
|
||||
args = t.callExpression(t.memberExpression(context, t.identifier("concat")), nodes);
|
||||
|
||||
return t.newExpression(
|
||||
t.callExpression(
|
||||
|
||||
@ -5,6 +5,7 @@ function isSorted(_ref) {
|
||||
|
||||
var x = _ref2[0];
|
||||
var y = _ref2[1];
|
||||
|
||||
var wow = _ref2.slice(2);
|
||||
|
||||
if (!zs.length) return true;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
"use strict";
|
||||
|
||||
new (babelHelpers.bind.apply(Numbers, babelHelpers.toConsumableArray(nums)))();
|
||||
new (babelHelpers.bind.apply(Numbers, [1].concat(babelHelpers.toConsumableArray(nums))))();
|
||||
new (babelHelpers.bind.apply(Numbers, [null].concat(babelHelpers.toConsumableArray(nums))))();
|
||||
new (babelHelpers.bind.apply(Numbers, [null].concat([1], babelHelpers.toConsumableArray(nums))))();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user