Sfoglia il codice sorgente

check directive bound status in v-model listener (fix #2023)

Evan You 10 anni fa
parent
commit
f9bbd20c90
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      src/directives/public/model/text.js

+ 3 - 1
src/directives/public/model/text.js

@@ -60,7 +60,9 @@ export default {
 
     // Now attach the main listener
     this.listener = function () {
-      if (composing) return
+      if (composing || !self._bound) {
+        return
+      }
       var val = number || isRange
         ? toNumber(el.value)
         : el.value