Skip to content

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

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 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 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
chrislone pushed a commit to chrislone/core that referenced this pull request Feb 4, 2023

Verified

This commit was signed with the committer’s verified signature. The key has expired.
BridgeAR Ruben Bridgewater
…#7461)

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

* test(compiler-sfc): test defineProps in multiple variable declaration
zhangzhonghe pushed a commit to zhangzhonghe/core that referenced this pull request Apr 12, 2023

Unverified

The email in this signature doesn’t match the committer email.
…#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