From d9dd1d8a0ac81d7d463e0788bb2e75b2d4866db6 Mon Sep 17 00:00:00 2001 From: sqal Date: Mon, 16 Mar 2020 15:28:17 +0100 Subject: [PATCH] fix(runtime-core): pass instance proxy as data() argument (#828) Match current behaviour of vue 2 --- packages/runtime-core/src/apiOptions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/runtime-core/src/apiOptions.ts b/packages/runtime-core/src/apiOptions.ts index 8769ec30..dcb66766 100644 --- a/packages/runtime-core/src/apiOptions.ts +++ b/packages/runtime-core/src/apiOptions.ts @@ -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) {