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

astring 1.8.5 generates invalid code when ?? is used #695

Closed
znewsham opened this issue May 24, 2023 · 1 comment
Closed

astring 1.8.5 generates invalid code when ?? is used #695

znewsham opened this issue May 24, 2023 · 1 comment
Labels

Comments

@znewsham
Copy link
Contributor

Motivation

astring.generate(acorn.parse('const x = (a && a.b) ?? c'))

Expected behavior

In version 1.8.4 the output is

const x = (a && a.b) ?? c;

Actual behavior

In 1.8.5 the (invalid) output is

const x = a && a.b ?? c;
@davidbonnet
Copy link
Owner

Thanks for reporting this @znewsham.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants