Skip to content

Commit 74675a1

Browse files
committed
fix v-model text initial value check
1 parent c410fcb commit 74675a1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/directives/model/text.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ module.exports = {
9090
}
9191

9292
// set initial value if present
93-
if (el.value) {
93+
if (
94+
el.hasAttribute('value') ||
95+
el.tagName === 'TEXTAREA'
96+
) {
9497
// watcher is not set up yet
9598
this.vm.$set(this.expression, el.value)
9699
}

0 commit comments

Comments
 (0)