Skip to content

Commit 13e8fa5

Browse files
author
Cristiano Calcagno
committed
Remove check for type undefined, which is now redundant.
1 parent e18fd34 commit 13e8fa5

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

jscomp/runtime/caml_obj.ml

-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ let rec caml_compare (a : Obj.t) (b : Obj.t) : int =
185185
| false, true -> 1
186186
| false, false ->
187187
if a_type = "boolean"
188-
|| a_type = "undefined"
189188
then (* TODO: refine semantics when comparing with [null] *)
190189
unsafe_js_compare a b
191190
else if a_type = "function" || b_type = "function"

lib/js/caml_obj.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function caml_compare(_a, _b) {
9090
}
9191
} else if (is_b_number) {
9292
return 1;
93-
} else if (a_type === "boolean" || a_type === "undefined") {
93+
} else if (a_type === "boolean") {
9494
var x = a;
9595
var y = b;
9696
if (x === y) {

0 commit comments

Comments
 (0)