Skip to content

Commit 2aafe10

Browse files
committed
fix v-model select off-dom infinite loop (fix vuejs#3104)
1 parent e987227 commit 2aafe10

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/directives/public/model/select.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ export default {
4848
this.vm.$on('hook:attached', () => {
4949
nextTick(this.forceUpdate)
5050
})
51+
if (!inDoc(el)) {
52+
nextTick(this.forceUpdate)
53+
}
5154
},
5255

5356
update (value) {
5457
var el = this.el
55-
if (!inDoc(el)) {
56-
return nextTick(this.forceUpdate)
57-
}
5858
el.selectedIndex = -1
5959
var multi = this.multiple && isArray(value)
6060
var options = el.options

0 commit comments

Comments
 (0)