website icon indicating copy to clipboard operation
website copied to clipboard

Update Optional Chaining documentation to reflect the return from undefined to true

Open mpaarating opened this issue 5 years ago • 5 comments

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.

mpaarating avatar Dec 04 '19 07:12 mpaarating

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.

babel-bot avatar Dec 04 '19 07:12 babel-bot

@mpaarating Good catch! PR's welcome!

JLHwung avatar Dec 05 '19 22:12 JLHwung

Great, I'll start working on this ASAP!

mpaarating avatar Dec 09 '19 15:12 mpaarating

@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 avatar Dec 13 '19 05:12 mpaarating

@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.

JLHwung avatar Dec 13 '19 10:12 JLHwung