Skip to content

Commit 57ffc3e

Browse files
authored
fix(ssr): avoid ast.helpers duplication (#6664)
1 parent b1817fe commit 57ffc3e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/compiler-ssr/src/ssrCodegenTransform.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ export function ssrCodegenTransform(ast: RootNode, options: CompilerOptions) {
4848
context.body.push(
4949
createCompoundExpression([`const _cssVars = { style: `, varsExp, `}`])
5050
)
51-
Array.from(cssContext.helpers.keys()).forEach(helper =>
52-
ast.helpers.push(helper)
53-
)
51+
Array.from(cssContext.helpers.keys()).forEach(helper => {
52+
if (!ast.helpers.includes(helper))
53+
ast.helpers.push(helper)
54+
})
5455
}
5556

5657
const isFragment =

0 commit comments

Comments
 (0)