]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
test: fix options usage of reactive
authorEvan You <yyx990803@gmail.com>
Thu, 27 Feb 2020 02:29:41 +0000 (21:29 -0500)
committerEvan You <yyx990803@gmail.com>
Thu, 27 Feb 2020 02:29:41 +0000 (21:29 -0500)
packages/runtime-core/src/apiOptions.ts

index e4daea84b6a685ec40a69ed901926b038d247413..ab0749f72e11fc0c6d43622292c34c6461eed0c6 100644 (file)
@@ -249,8 +249,9 @@ export function applyOptions(
   } = options
 
   const renderContext =
-    instance.renderContext === EMPTY_OBJ
-      ? (instance.renderContext = {})
+    instance.renderContext === EMPTY_OBJ &&
+    (computedOptions || methods || watchOptions || injectOptions)
+      ? (instance.renderContext = reactive({}))
       : instance.renderContext
 
   const globalMixins = instance.appContext.mixins