Skip to content

Commit

Permalink
Replace array-spread-plus-map combination with Array.from call
Browse files Browse the repository at this point in the history
  • Loading branch information
jayaddison committed Jul 7, 2020
1 parent 2b6dbe4 commit 6da36af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/babel-plugin-transform-block-scoping/src/index.js
Expand Up @@ -543,7 +543,7 @@ class BlockScoping {
this.hoistVarDeclarations();

// turn outsideLetReferences into an array
const args = [...outsideRefs.values()].map(node => t.cloneNode(node));
const args = Array.from(outsideRefs.values(), node => t.cloneNode(node));
const params = args.map(id => t.cloneNode(id));

const isSwitch = this.blockPath.isSwitchStatement();
Expand Down

0 comments on commit 6da36af

Please sign in to comment.