test: fix reactivity tests

This commit is contained in:
Evan You
2019-08-20 09:58:10 -04:00
parent 0519e10518
commit aacad85058
14 changed files with 36 additions and 38 deletions

View File

@@ -20,6 +20,6 @@
},
"homepage": "https://github.com/vuejs/vue/tree/dev/packages/runtime-core#readme",
"dependencies": {
"@vue/observer": "3.0.0-alpha.1"
"@vue/reactivity": "3.0.0-alpha.1"
}
}

View File

@@ -242,7 +242,7 @@ export function setupStatefulComponent(instance: ComponentInstance) {
} else {
// setup returned bindings.
// assuming a render function compiled from template is present.
instance.data = reactive(setupResult)
instance.data = reactive(setupResult || {})
if (__DEV__ && !Component.render) {
// TODO warn missing render fn
}