Skip to content

Commit

Permalink
fix(ssr): avoid ast.helpers duplication (vuejs#6664)
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu authored and chrislone committed Feb 4, 2023
1 parent 3c5690e commit 9dbae99
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/compiler-ssr/src/ssrCodegenTransform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ export function ssrCodegenTransform(ast: RootNode, options: CompilerOptions) {
context.body.push(
createCompoundExpression([`const _cssVars = { style: `, varsExp, `}`])
)
Array.from(cssContext.helpers.keys()).forEach(helper =>
ast.helpers.push(helper)
)
Array.from(cssContext.helpers.keys()).forEach(helper => {
if (!ast.helpers.includes(helper))
ast.helpers.push(helper)
})
}

const isFragment =
Expand Down

0 comments on commit 9dbae99

Please sign in to comment.