From a6817362abeed5dbf51d5c43ad6622f38dcd474e Mon Sep 17 00:00:00 2001 From: ARDA7787 <104717701+ARDA7787@users.noreply.github.com> Date: Mon, 17 Aug 2026 01:33:57 -0400 Subject: [PATCH] fix(evaluate): 0.0 is serialized as -0 --- playwright/_impl/_js_handle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright/_impl/_js_handle.py b/playwright/_impl/_js_handle.py index 84ef40d18..286fcdc8a 100644 --- a/playwright/_impl/_js_handle.py +++ b/playwright/_impl/_js_handle.py @@ -145,7 +145,7 @@ def serialize_value( return dict(v="Infinity") if value == float("-inf"): return dict(v="-Infinity") - if value == float("-0"): + if value == 0 and math.copysign(1, value) == -1: return dict(v="-0") if math.isnan(value): return dict(v="NaN")