Skip to content

Commit

Permalink
fix(runtime-core): pass instance proxy as data() argument (#828)
Browse files Browse the repository at this point in the history
Match current behaviour of vue 2
  • Loading branch information
sqal authored Mar 16, 2020
1 parent f107abf commit d9dd1d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/runtime-core/src/apiOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit d9dd1d8

Please sign in to comment.