We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d5bfd11 commit 5314549Copy full SHA for 5314549
src/python_minifier/transforms/constant_folding.py
@@ -33,7 +33,7 @@ def visit_BinOp(self, node):
33
except Exception as e:
34
return node
35
36
- if math.isnan(value):
+ if isinstance(value, float) and math.isnan(value):
37
# There is no nan literal.
38
new_node = ast.Call(func=ast.Name('float', ctx=ast.Load()), args=[ast.Str('nan')], keywords=[])
39
elif isinstance(value, str):
0 commit comments