Skip to content

Commit

Permalink
ChartsOrg#3857 Defer the update of value be done after returning the…
Browse files Browse the repository at this point in the history
… current value.
  • Loading branch information
ooba committed Feb 25, 2019
1 parent cf36285 commit c87d848
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ extension BarLineScatterCandleBubbleRenderer.XBounds: Sequence {
}

public mutating func next() -> Int? {
defer { value += 1 }
guard value < bounds.max else { return nil }
value += 1
return value
}
}
Expand Down

0 comments on commit c87d848

Please sign in to comment.