No unneeded empty arrays in transform spread (#6763)

* No unneeded empty arrays in transform spread

Since Array.prototype.concat creates a new array from inputs, there's
no need to call it from a new empty array ([].concat()).

* [fixup] simplify detection of new array
This commit is contained in:
Anatoli Papirovski
2017-11-09 14:51:56 -05:00
committed by Henry Zhu
parent 617d35245f
commit aefbb1380e
7 changed files with 10 additions and 10 deletions

View File

@@ -21,7 +21,7 @@ var _ref4 = [a[1], a[0]];
a[0] = _ref4[0];
a[1] = _ref4[1];
var _ref5 = [].concat(babelHelpers.toConsumableArray(foo), [bar]),
var _ref5 = babelHelpers.toConsumableArray(foo).concat([bar]),
a = _ref5[0],
b = _ref5[1];