]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(runtime-core): pass instance proxy as data() argument (#828)
authorsqal <sqal08@gmail.com>
Mon, 16 Mar 2020 14:28:17 +0000 (15:28 +0100)
committerGitHub <noreply@github.com>
Mon, 16 Mar 2020 14:28:17 +0000 (10:28 -0400)
Match current behaviour of vue 2

packages/runtime-core/src/apiOptions.ts

index 8769ec30dbd4450096404a2a1650452793c40d0b..dcb66766b431a71537255da1e98109d3634222fa 100644 (file)
@@ -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) {