Skip to content

Commit 99859b7

Browse files
committed
Update form-text.js
1 parent 5a7571e commit 99859b7

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/mixins/form-text.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,12 @@ export default {
106106
watch: {
107107
value(newValue) {
108108
const stringifyValue = toString(newValue)
109-
const modifiedValue = this.modifyValue(newValue)
110-
if (stringifyValue !== this.localValue && modifiedValue !== this.vModelValue) {
109+
if (stringifyValue !== this.localValue && newValue !== this.vModelValue) {
111110
// Clear any pending debounce timeout, as we are overwriting the user input
112111
this.clearDebounce()
113112
// Update the local values
114113
this.localValue = stringifyValue
115-
this.vModelValue = modifiedValue
114+
this.vModelValue = this.modifyValue(newValue)
116115
}
117116
}
118117
},
@@ -123,15 +122,6 @@ export default {
123122
mounted() {
124123
// Set up destroy handler
125124
this.$on('hook:beforeDestroy', this.clearDebounce)
126-
// Preset the internal state
127-
const { value } = this
128-
const stringifyValue = toString(value)
129-
const modifiedValue = this.modifyValue(value)
130-
/* istanbul ignore next */
131-
if (stringifyValue !== this.localValue && modifiedValue !== this.vModelValue) {
132-
this.localValue = stringifyValue
133-
this.vModelValue = modifiedValue
134-
}
135125
},
136126
methods: {
137127
clearDebounce() {

0 commit comments

Comments
 (0)