mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-29 02:33:58 +00:00
This commit is contained in:
@@ -938,7 +938,7 @@ when defined(js):
|
||||
of "[object Array]": return JArray
|
||||
of "[object Object]": return JObject
|
||||
of "[object Number]":
|
||||
if isInteger(x):
|
||||
if isInteger(x) and 1.0 / cast[float](x) != -Inf: # preserve -0.0 as float
|
||||
if isSafeInteger(x):
|
||||
return JInt
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user