mirror of https://github.com/vuejs/core.git
chore: tweaks
This commit is contained in:
parent
40c4f590ec
commit
180308c6a3
|
@ -107,7 +107,6 @@ export class CodegenContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const [prefix, nums] of map) {
|
for (const [prefix, nums] of map) {
|
||||||
if (nums.size === 0) continue
|
|
||||||
this.nextIdMap.set(prefix, buildNextIdMap(nums))
|
this.nextIdMap.set(prefix, buildNextIdMap(nums))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,9 +124,7 @@ export class TransformContext<T extends AllNode = AllNode> {
|
||||||
increaseId = (): number => {
|
increaseId = (): number => {
|
||||||
// allocate an id that won't conflict with user-defined bindings when used
|
// allocate an id that won't conflict with user-defined bindings when used
|
||||||
// as generated identifiers with n/x/r prefixes (e.g., n1, x1, r1).
|
// as generated identifiers with n/x/r prefixes (e.g., n1, x1, r1).
|
||||||
const id = this.nextIdMap
|
const id = getNextId(this.nextIdMap, this.globalId)
|
||||||
? (this.nextIdMap.get(this.globalId) ?? this.globalId)
|
|
||||||
: this.globalId
|
|
||||||
// advance next
|
// advance next
|
||||||
this.globalId = getNextId(this.nextIdMap, id + 1)
|
this.globalId = getNextId(this.nextIdMap, id + 1)
|
||||||
return id
|
return id
|
||||||
|
|
Loading…
Reference in New Issue