Commit Graph

2 Commits (318568e22a69213aa59bf1e6d8b12ce7826e7c56)

Author SHA1 Message Date
Lucas Duailibe bd78572b19 Break closing paren of ConditionalExpression in member chains 2017-09-10 15:00:52 -06:00
Lucas Duailibe 955a2c1472 Keep conditional expressions in one line on method chains (#2784)
Fixes #2775.

This commit will make conditional expressions to match the behavior of
logical expression in method chains:

```js
(a ? b : c).map()

// if the conditional fits in oneline
(a ? b : c)
  .map()

// if the conditional doesn't fit
(a
  ? b
  : c)
  .map()
```
2017-09-10 08:34:55 -07:00