fix: handle case of ref declaration without initial value

This commit is contained in:
Evan You
2020-10-30 15:29:38 -04:00
parent ed2eb81317
commit 8485cd4843
3 changed files with 22 additions and 12 deletions

View File

@@ -292,6 +292,7 @@ exports[`SFC compile <script setup> ref: syntax sugar convert ref declarations 1
export function setup() {
const foo = ref()
const a = ref(1)
const b = ref({
count: 0
@@ -299,7 +300,7 @@ export function setup() {
let c = () => {}
let d
return { a, b, c, d }
return { foo, a, b, c, d }
}
export default { setup }"