Closed pikax closed 3 years ago
Odd behaviour when using toRefs(props) if the prop has not been passed
toRefs(props)
defineComponent({ props: { foo: String, }, setup(props) { const { foo } = toRefs(props) // props is `{}` making `toRefs` To return `{}` // correct const foo = toRef(props, 'foo') }, })
Important: Do NOT comment on this PR. Please use the discussion thread linked above to provide feedback, as it provides branched discussions that are easier to follow. This also makes the edit history of the PR clearer.
fixed by https://github.com/vuejs/vue-next/commit/4fe4de0a49ffc2461b0394e74674af38ff5e2a20
Summary
Odd behaviour when using
toRefs(props)
if the prop has not been passedLinks
Important: Do NOT comment on this PR. Please use the discussion thread linked above to provide feedback, as it provides branched discussions that are easier to follow. This also makes the edit history of the PR clearer.