Skip to content

Commit

Permalink
refactor(codegen): only generate pre data for possible components
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Oct 24, 2018
1 parent 0b16927 commit 002acbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/codegen/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function genElement (el: ASTElement, state: CodegenState): string {
code = genComponent(el.component, el, state)
} else {
let data
if (!el.plain || el.pre) {
if (!el.plain || (el.pre && state.maybeComponent(el))) {
data = genData(el, state)
}

Expand Down

0 comments on commit 002acbe

Please sign in to comment.