Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c500532469 | ||
|
|
3396cc84f1 |
@@ -1,3 +1,7 @@
|
||||
# 1.13.4
|
||||
|
||||
* Fix single spread element returning itself.
|
||||
|
||||
# 1.13.3
|
||||
|
||||
* Upgrade `acorn-6to5`.
|
||||
|
||||
@@ -48,7 +48,10 @@ exports.ArrayExpression = function (node, parent, file) {
|
||||
var nodes = build(elements, file);
|
||||
var first = nodes.shift();
|
||||
|
||||
if (!nodes.length) return first;
|
||||
if (!t.isArrayExpression(first)) {
|
||||
nodes.unshift(first);
|
||||
first = t.arrayExpression([]);
|
||||
}
|
||||
|
||||
return t.callExpression(t.memberExpression(first, t.identifier("concat")), nodes);
|
||||
};
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "6to5",
|
||||
"description": "Turn ES6 code into readable vanilla ES5 with source maps",
|
||||
"version": "1.13.3",
|
||||
"version": "1.13.4",
|
||||
"author": "Sebastian McKenzie <sebmck@gmail.com>",
|
||||
"homepage": "https://github.com/6to5/6to5",
|
||||
"repository": {
|
||||
|
||||
@@ -4,4 +4,4 @@ var _toArray = function (arr) {
|
||||
return Array.isArray(arr) ? arr : Array.from(arr);
|
||||
};
|
||||
|
||||
var lyrics = _toArray(parts).concat(["head", "and", "toes"]);
|
||||
var lyrics = [].concat(_toArray(parts), ["head", "and", "toes"]);
|
||||
|
||||
@@ -4,4 +4,4 @@ var _toArray = function (arr) {
|
||||
return Array.isArray(arr) ? arr : Array.from(arr);
|
||||
};
|
||||
|
||||
_toArray(foo);
|
||||
[].concat(_toArray(foo));
|
||||
|
||||
Reference in New Issue
Block a user