Skip to content

Commit c878651

Browse files
committed
Enhance equality check to include type comparison
1 parent 0b82517 commit c878651

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jsonata/jsonata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ def evaluate_equality_expression(self, lhs: Optional[Any], rhs: Optional[Any], o
800800

801801
result = None
802802
if op == "=":
803-
result = lhs == rhs # isDeepEqual(lhs, rhs);
803+
result = lhs == rhs and type(lhs) == type(rhs) # isDeepEqual(lhs, rhs);
804804
elif op == "!=":
805805
result = lhs != rhs # !isDeepEqual(lhs, rhs);
806806
return result

0 commit comments

Comments
 (0)