Skip to content

Commit

Permalink
Update src/betterproto/__init__.py
Browse files Browse the repository at this point in the history
Co-authored-by: Arun Babu Neelicattu <[email protected]>
  • Loading branch information
Gobot1234 and abn authored Apr 22, 2022
1 parent 0f7307c commit 9e88585
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/betterproto/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ def _dump_float(value: float) -> Union[float, str]:
return INFINITY
if value == -float("inf"):
return NEG_INFINITY
if math.isnan(value):
if isinstance(value, float) and math.isnan(value):
return NAN
return value

Expand Down

0 comments on commit 9e88585

Please sign in to comment.