Skip to content

Commit

Permalink
fix CleanStates lost numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
IngoRoessner committed Nov 29, 2023
1 parent 4dde18c commit d5f5f79
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/state/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ func CleanStates(in map[string]interface{}) (out map[string]interface{}) {
case float64:
if math.IsNaN(v) {
out[key] = 0
} else {
out[key] = v
}
default:
out[key] = value
Expand Down

0 comments on commit d5f5f79

Please sign in to comment.