Skip to content

Commit

Permalink
chore: add semi when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 committed Dec 8, 2024
1 parent 3acad8d commit 484e8ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/compiler-vapor/src/generators/operation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ export function genEffects(
for (let i = 0; i < effects.length; i++) {
const effect = (context.processingRenderEffect = effects[i])
operationsCount += effect.operations.length
const frags = genEffect(effect, context, declareNames)
const needSemi = frag[frag.length - 1] === ')' && frags[0] === '('
i > 0 && push(NEWLINE)
push(...genEffect(effect, context, declareNames))
push(needSemi ? ';' : undefined, ...frags)
}

const newLineCount = frag.filter(frag => frag === NEWLINE).length
Expand Down

0 comments on commit 484e8ed

Please sign in to comment.