Skip to content

Commit

Permalink
Merge pull request ChartsOrg#1733 from Selficide/fix-decimal-crash-in…
Browse files Browse the repository at this point in the history
…-chartutils

Added a check against NaN, fix ChartsOrg#1737
  • Loading branch information
liuxuan30 authored Nov 18, 2016
2 parents e67a454 + f48d76f commit e51bfb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Charts/Utils/ChartUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ open class ChartUtils

let i = roundToNextSignificant(number: Double(number))

if i.isInfinite
if i.isInfinite || i.isNaN
{
return 0
}
Expand Down

0 comments on commit e51bfb0

Please sign in to comment.