Skip to content

Commit

Permalink
Merge pull request #20 from hachinobu/patch-3
Browse files Browse the repository at this point in the history
Changed branching process
  • Loading branch information
malcommac authored Mar 8, 2017
2 parents 413787f + c61cef8 commit ee48a11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Hydra/Promise.swift
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public class Promise<Value> {
/// In order to be runnable, the state of the promise must be pending and the body itself must not be called another time.
internal func runBody() {
self.stateQueue.sync {
if state.isPending == false || bodyCalled == true {
if !state.isPending || bodyCalled {
return
}
bodyCalled = true
Expand Down

0 comments on commit ee48a11

Please sign in to comment.