Skip to content

Commit 83f6ab6

Browse files
authored
chore(compiler-ssr): move defaultProps initialization into input tag branch (#14115)
1 parent 3942dbe commit 83f6ab6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/compiler-ssr/src/transforms/ssrVModel.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ export const ssrTransformModel: DirectiveTransform = (dir, node, context) => {
8383

8484
if (node.tagType === ElementTypes.ELEMENT) {
8585
const res: DirectiveTransformResult = { props: [] }
86-
const defaultProps = [
87-
// default value binding for text type inputs
88-
createObjectProperty(`value`, model),
89-
]
9086
if (node.tag === 'input') {
87+
const defaultProps = [
88+
// default value binding for text type inputs
89+
createObjectProperty(`value`, model),
90+
]
9191
const type = findProp(node, 'type')
9292
if (type) {
9393
const value = findValueBinding(node)

0 commit comments

Comments
 (0)