website
website copied to clipboard
Update Optional Chaining documentation to reflect the return from undefined to true
Per https://github.com/babel/babel/issues/10805 and the subsequent PR , When using optional delete to delete a property of a nullish base, the delete operation returns now returns true. Should a distinction be made in the docs to support this change?
If so, I can make the corresponding change to the documentation.
Hey @mpaarating! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite.
@mpaarating Good catch! PR's welcome!
Great, I'll start working on this ASAP!
@JLHwung After looking into the docs for @babel/plugin-proposal-optional-chaining, there isn't a mention of what the current behavior is (undefined return for nullish base). As such, I don't think that additional documentation need to be added. What are your thoughts?
@mpaarating I think it will be great to add a section like delete nested properties because the behaviour is changed after 7.8 (to be aligned to the spec) and people may reply on the old behaviour. So it should be clarified in the docs.