fix(runtime-core): pass instance proxy as data() argument (#828)
Match current behaviour of vue 2
This commit is contained in:
parent
f107abf247
commit
d9dd1d8a0a
@ -286,7 +286,7 @@ export function applyOptions(
|
||||
`Plain object usage is no longer supported.`
|
||||
)
|
||||
}
|
||||
const data = dataOptions.call(ctx)
|
||||
const data = dataOptions.call(ctx, ctx)
|
||||
if (!isObject(data)) {
|
||||
__DEV__ && warn(`data() should return an object.`)
|
||||
} else if (instance.data === EMPTY_OBJ) {
|
||||
|
Loading…
Reference in New Issue
Block a user