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

Already on GitHub? Sign in to your account

Bug: Code blocks inside Methods are killed while transforming #4

Closed
umavennila opened this issue Nov 1, 2019 · 2 comments
Closed

Comments

@umavennila
Copy link

If blocks, Switch Case blocks inside Vue component's methods are just missing after the transformation

@mcuking
Copy link
Owner

mcuking commented Nov 18, 2019

I am so sorry to reply to you too late.

I review the code and find some statements (IfStatement, SwitchStatement...) are lost in the proceed of formatting this expression (such as this.formModel -> this.state.formModel).

So I change the traverse visitor from statement to enter.

You can learn more about traverse in the below link.

babel-traverse

@mcuking mcuking closed this as completed Dec 2, 2019
@umavennila
Copy link
Author

Thanks for the fix! Its perfect.

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

No branches or pull requests

2 participants