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() ```
10 lines
213 B
JavaScript
10 lines
213 B
JavaScript
(valid
|
|
? helper.responseBody(this.currentUser)
|
|
: helper.response(401))
|
|
.map(res => res.json());
|
|
|
|
(valid
|
|
? helper.responseBody(this.currentUser)
|
|
: helper.responseBody(defaultUser))
|
|
.map(res => res.json());
|