Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(compiler-sfc): allow declaring variables after defineProps #7461

Merged

Conversation

huang-julien
Copy link
Contributor

hi 馃憢 this PR fix #7460.

It allow declaring multiple variables with a single variable declaration.
this would fail because of a return which has been changed to continue in this pr
const {hello} = defineProps(['hello']), test = "HALLO"

sxzz
sxzz approved these changes Jan 4, 2023
@sxzz sxzz self-assigned this Jan 4, 2023
@sxzz sxzz added the need test The PR has missing test cases. label Jan 4, 2023
@sxzz
Copy link
Member

sxzz commented Jan 4, 2023

Could you please add a unit test for the issue?

sxzz
sxzz approved these changes Jan 4, 2023
@sxzz sxzz removed the need test The PR has missing test cases. label Jan 4, 2023
@LinusBorg LinusBorg merged commit 686c829 into vuejs:main Jan 9, 2023
9 checks passed
chrislone pushed a commit to chrislone/core that referenced this pull request Feb 4, 2023
鈥#7461)

* fix(compiler-sfc): allow declaring variables after defineProps

* test(compiler-sfc): test defineProps in multiple variable declaration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

variables declaration after defineProps is ignored
3 participants