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

Merge computed MemberExpression in member chain #2670

Merged
merged 1 commit into from Aug 26, 2017

Conversation

azz
Copy link
Member

@azz azz commented Aug 26, 2017

// Before
data
  [key]('foo')
  .then(() => console.log('bar'))
  .catch(() => console.log('baz'));

// After
data[key]('foo')
  .then(() => console.log('bar'))
  .catch(() => console.log('baz'));

Fixes #1313


I'm not 100% sure if it's worth adding a special case for computeds here though? This issue is the second-highest upvoted bug though.

@vjeux vjeux merged commit dd84559 into prettier:master Aug 26, 2017
@vjeux
Copy link
Contributor

vjeux commented Aug 26, 2017

It doesn't hurt :)

@azz azz deleted the computed-member-expr branch August 26, 2017 13:32
@azz azz mentioned this pull request Aug 27, 2017
6 tasks
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jan 19, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants