Skip to content

Commit d9dd1d8

Browse files
authored
fix(runtime-core): pass instance proxy as data() argument (#828)
Match current behaviour of vue 2
1 parent f107abf commit d9dd1d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/runtime-core/src/apiOptions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ export function applyOptions(
286286
`Plain object usage is no longer supported.`
287287
)
288288
}
289-
const data = dataOptions.call(ctx)
289+
const data = dataOptions.call(ctx, ctx)
290290
if (!isObject(data)) {
291291
__DEV__ && warn(`data() should return an object.`)
292292
} else if (instance.data === EMPTY_OBJ) {

0 commit comments

Comments
 (0)