Skip to content

Commit

Permalink
Fix destructuring assignments being transpiled for edge 15 (#9902)
Browse files Browse the repository at this point in the history
* Current behavior for preset-env destructuring and edge

* fix(preset-env): destructuring transpiled in edge 15
  • Loading branch information
eps1lon authored and nicolo-ribaudo committed May 3, 2019
1 parent 16e17c5 commit eae7a33
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
1 change: 0 additions & 1 deletion packages/babel-preset-env/data/plugin-features.js
Expand Up @@ -68,7 +68,6 @@ const es = {
features: [
"destructuring, assignment",
"destructuring, declarations",
"destructuring, parameters",
],
},
"transform-block-scoping": {
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-env/data/plugins.json
Expand Up @@ -173,7 +173,7 @@
},
"transform-destructuring": {
"chrome": "51",
"edge": "18",
"edge": "15",
"firefox": "53",
"safari": "10",
"node": "6.5",
Expand Down
@@ -0,0 +1,3 @@
((a, { b = 0, c = 3 }) => {
return a === 1 && b === 2 && c === 3;
})(1, { b: 2 });
@@ -0,0 +1,13 @@
{
"presets": [
[
"../../../../lib",
{
"targets": {
"browsers": ["edge >= 15"]
},
"modules": false
}
]
]
}
@@ -0,0 +1,9 @@
((a, _ref) => {
let {
b = 0,
c = 3
} = _ref;
return a === 1 && b === 2 && c === 3;
})(1, {
b: 2
});

0 comments on commit eae7a33

Please sign in to comment.