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

[JavaScript] Optional chaining does not work properly #2349

Closed
ghost opened this issue Apr 23, 2020 · 2 comments · Fixed by #2350
Closed

[JavaScript] Optional chaining does not work properly #2349

ghost opened this issue Apr 23, 2020 · 2 comments · Fixed by #2350

Comments

@ghost
Copy link

ghost commented Apr 23, 2020

Examples:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining

object?.key;
object?.[key];
object?.(key);

Actual:

Expected:

or

Introduced in #2132

/cc author @Thom1729

@ghost ghost changed the title [JavaScript] Optional chaining and nullish coalescing do not work properly [JavaScript] Optional chaining does not work properly Apr 23, 2020
@jfcherng
Copy link
Collaborator

jfcherng commented Apr 23, 2020

In https://github.com/sublimehq/Packages/pull/2132/files#diff-21d3129035563b382f383dc8438d53a8R95, it uses .? as the accessor. But the correct one should be ?..

@ghost
Copy link
Author

ghost commented Apr 27, 2020

Given that many JavaScript engines already support this feature, can we expect a reasonably fast fix? @Thom1729

jfcherng added a commit to jfcherng-sublime/ST-Official-Packages that referenced this issue Apr 28, 2020
jfcherng added a commit to jfcherng-sublime/ST-Official-Packages that referenced this issue Apr 28, 2020
mitranim pushed a commit to mitranim/Packages that referenced this issue Mar 25, 2022
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 a pull request may close this issue.

1 participant