Skip to content

Commit

Permalink
tweak: scope._generateUid returns name for i = 0 and 1
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Oct 6, 2020
1 parent 84fde27 commit cf10e41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -11,7 +11,7 @@ import syntaxClassStaticBlock from "@babel/plugin-syntax-class-static-block";
function generateUid(scope, denyList: Set<string>) {
const name = "";
let uid;
let i = 0;
let i = 1;
do {
uid = scope._generateUid(name, i);
i++;
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-traverse/src/scope/index.js
Expand Up @@ -368,7 +368,7 @@ export default class Scope {
.replace(/[0-9]+$/g, "");

let uid;
let i = 0;
let i = 1;
do {
uid = this._generateUid(name, i);
i++;
Expand Down

0 comments on commit cf10e41

Please sign in to comment.