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

Copy "optional" property when cloning Identifier node #9333

Merged

Conversation

unconfident
Copy link
Contributor

Fixes #9331

Q                       A
Fixed Issues? Fixes #9331
Patch: Bug Fix? Yes
Major: Breaking Change? no
Minor: New Feature? no
Tests Added + Pass? None added, should pass
Documentation PR Link
Any Dependency Changes? no
License MIT

Copying value of optional property of "Identifier" nodes when cloning AST nodes means that clone will be more similar to original node and optional parameters will continue to be optional. Very important when used through babel-template.
See #9331 to find out how not copying it caused problems

@babel-bot
Copy link
Collaborator

babel-bot commented Jan 14, 2019

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/9791/

@babel-bot
Copy link
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/9789/

@existentialism existentialism added PR: Bug Fix 🐛 A type of pull request used for our changelog categories pkg: types labels Jan 14, 2019
@hzoo hzoo merged commit e958806 into babel:master Jan 17, 2019
@unconfident unconfident deleted the clone_optional_property_of_identifier_node branch January 29, 2019 11:09
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: types PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optional function params are not marked as optional after going through @babel/template
6 participants