Skip to content

Commit

Permalink
Merge pull request #632 from aarondaub/ad-nilCoalesceEntryCount
Browse files Browse the repository at this point in the history
Use nil coalescing in ChartDataSet's entryCount (Fixes #631)
  • Loading branch information
danielgindi committed Dec 30, 2015
2 parents 79534ff + 2e166b1 commit da03c94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Charts/Classes/Data/ChartDataSet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public class ChartDataSet: NSObject
return yValueSum / Double(valueCount)
}

public var entryCount: Int { return _yVals!.count; }
public var entryCount: Int { return _yVals?.count ?? 0 }

public func yValForXIndex(x: Int) -> Double
{
Expand Down

0 comments on commit da03c94

Please sign in to comment.