Skip to content

Commit b034abf

Browse files
committed
fix: always set transformed model value on attrs
1 parent 1a6f7a5 commit b034abf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/core/vdom/create-component.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,7 @@ function mergeHook (f1: any, f2: any): Function {
250250
function transformModel (options, data: any) {
251251
const prop = (options.model && options.model.prop) || 'value'
252252
const event = (options.model && options.model.event) || 'input'
253-
const addTo = (options.props && prop in options.props) ? 'props' : 'attrs'
254-
;(data[addTo] || (data[addTo] = {}))[prop] = data.model.value
253+
;(data.attrs || (data.attrs = {}))[prop] = data.model.value
255254
const on = data.on || (data.on = {})
256255
const existing = on[event]
257256
const callback = data.model.callback

0 commit comments

Comments
 (0)