Skip to content

Commit 8a5da70

Browse files
committed
fix empty textarea overwriting initial model value
1 parent a515230 commit 8a5da70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/directives/model/text.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ module.exports = {
9292
// set initial value if present
9393
if (
9494
el.hasAttribute('value') ||
95-
el.tagName === 'TEXTAREA'
95+
(el.tagName === 'TEXTAREA' && el.value.trim())
9696
) {
9797
// watcher is not set up yet
9898
this.vm.$set(this.expression, el.value)

0 commit comments

Comments
 (0)