Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 committed Dec 4, 2024
1 parent 43743b8 commit 02209bd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
8 changes: 2 additions & 6 deletions packages/compiler-vapor/src/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,8 @@ export class CodegenContext {
currentRenderEffect: IREffect | undefined = undefined
renderEffectSeemNames: Record<string, number> = Object.create(null)
shouldGenEffectDeps = (): boolean => {
// only need to generate effect deps when it's not nested in v-once or v-for
return !!(
this.currentRenderEffect &&
!this.currentRenderEffect.inVOnce &&
!this.currentRenderEffect.inVFor
)
// only need to generate effect deps when it's not nested in v-for
return !!(this.currentRenderEffect && !this.currentRenderEffect.inVFor)
}

identifiers: Record<string, string[]> = Object.create(null)
Expand Down
1 change: 0 additions & 1 deletion packages/compiler-vapor/src/ir/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ export interface IREffect {
varNamesOverwritten: Set<string>
conditions: string[]
inVFor: boolean
inVOnce: boolean
}

type Overwrite<T, U> = Pick<T, Exclude<keyof T, keyof U>> &
Expand Down
1 change: 0 additions & 1 deletion packages/compiler-vapor/src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ export class TransformContext<T extends AllNode = AllNode> {
varNamesToDeclare: new Set<string>(),
varNamesOverwritten: new Set<string>(),
inVFor: this.inVFor > 0,
inVOnce: this.inVOnce,
})
}

Expand Down

0 comments on commit 02209bd

Please sign in to comment.