Skip to content

Commit

Permalink
fix(ssr): avoid ast.helpers duplication (#6664)
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 27, 2022
1 parent b1817fe commit 57ffc3e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/compiler-ssr/src/ssrCodegenTransform.ts
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 57ffc3e

Please sign in to comment.