From 5d952cc051edf3a4cd07e38a022e22819b2a6e50 Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 26 Feb 2020 21:29:41 -0500 Subject: [PATCH] test: fix options usage of reactive --- packages/runtime-core/src/apiOptions.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/runtime-core/src/apiOptions.ts b/packages/runtime-core/src/apiOptions.ts index e4daea84..ab0749f7 100644 --- a/packages/runtime-core/src/apiOptions.ts +++ b/packages/runtime-core/src/apiOptions.ts @@ -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