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

Invalid output when a computed property follows a property with an arrow function as value #263

Open
marijnh opened this issue Aug 18, 2020 · 0 comments

Comments

@marijnh
Copy link
Contributor

marijnh commented Aug 18, 2020

This code:

console.log({
  Right: () => true,
  [1 + 1]: 2
})

Produces this output:

var obj;
console.log(( obj = {
  Right: function () { return true
}; }, obj[1 + 1] = 2, obj ))

... which has a semicolon inside an object literal. Probably once again text is inserted in the wrong order (the closing brace of the arrow relative to the semicolon for the return statement).

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

No branches or pull requests

1 participant