Skip to content

Commit

Permalink
reformat ternary statements that break source map application
Browse files Browse the repository at this point in the history
  • Loading branch information
novemberborn committed Mar 24, 2016
1 parent 6952498 commit 111f742
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ export class Chan {
}
} else {
assert(item.type == TYPE_VALUE || item.type == TYPE_ERROR)
let fn = item.type == TYPE_VALUE ? fnVal : fnErr
let fn = item.type == TYPE_VALUE
? fnVal
: fnErr
item.fnVal && item.fnVal()
fn && fn(item.value)
if (this._state != STATE_CLOSED) {
Expand All @@ -62,8 +64,10 @@ export class Chan {
this._triggerWaiters(true)
this._emitDrain()
}

return needsCancelFn ? () => { item.fnVal = item.fnErr = undefined } : nop

return needsCancelFn
? () => item.fnVal = item.fnErr = undefined
: nop;
}

_takeFromWaitingPublisher() {
Expand Down

0 comments on commit 111f742

Please sign in to comment.